can not get referer

They have: 7 posts

Joined: Mar 2004

while throuwing a dump on $_SERVER has, in PHP, I can not get some fields including HTTP_REFERER. Instead I get some:

HTTP________ => ~~~~:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HTTP________________ => ~~~~~ ~~~~~~~

any idea what problem is?

I am trying to make a stats script and this is mandatory? Should I try using some client side solution with javascript instead?

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

What results are you getting when you do something like the following:

<pre><tt><? print_r($_SERVER); ?></tt></pre>'

I'm trying to figure out what will give you an output of "SERVER________" followed by a bunch of ~'s

I could understand if it was just blank, but having ~'s in it seems weird.

Also, check your antivirus software, some will block you referer information by default when installed. Maybe this is what is messing it up.

-Greg

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

Try phpinfo() and compare the output. Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.