homepage Welcome to WebmasterWorld Guest from 54.211.213.10
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
problem with $_SERVER['HTTP_REFERRER']
Why does it display nothing?
neiljones




msg:1275535
 1:25 pm on Mar 14, 2004 (gmt 0)

Here is a snippet of code which I have rediced the proble to and worked with to demonstrate the problem.
<?

$ipaddress=$_SERVER['REMOTE_ADDR'];
$referrer=$_SERVER['HTTP_REFERRER'];
print "Ipaddress ".$ipaddress."<br>";
print "Referrer ".$referrer."<br>";

?>

When run there is consistently nothing being printed for the referrer address. (The ip address is fine.) This occurs even when I put a test link on a page on a different unconnected server on the other side of the Atlantic Ocean.

Is there something wrong with the server set up ( out of my direct control.) or is there something I am doing wrong?

 

mipapage




msg:1275536
 1:30 pm on Mar 14, 2004 (gmt 0)

Do you have an antiviru or firewall running on your machine? Try with those off if you do. Norton AV/Firewall hides the referer values...

Romeo




msg:1275537
 1:37 pm on Mar 14, 2004 (gmt 0)

Hi Neil,

try the HTTP_REFERER instead (... with only 3 "R"s in the word instead of 4).

:-)

Regards,
R.

Birdman




msg:1275538
 1:43 pm on Mar 14, 2004 (gmt 0)

The manual shows it with one (R).

$_SERVER['HTTP_REFERER']

[php.net...]

mipapage




msg:1275539
 3:29 pm on Mar 14, 2004 (gmt 0)

Nice catch, romeo!

neiljones




msg:1275540
 7:13 pm on Mar 14, 2004 (gmt 0)

Thanks. I'm sure that isn't they way we spell it on this side of the pond. I bet I'm not the first to have this problem though. At least I remember to type <center> not <centre>.

jatar_k




msg:1275541
 7:33 pm on Mar 14, 2004 (gmt 0)

I bet I'm not the first to have this problem though

far from it, no one spells it that way

from the dictionary
<World-Wide Web> A misspelling of "referrer" which somehow made it into the HTTP standard. A given web page's referer (sic) is the URL of whatever web page contains the link that the user followed to the current page. Most browsers pass this information as part of a request.

neiljones




msg:1275542
 8:16 pm on Mar 14, 2004 (gmt 0)

That explains it. I checked it out afterwards and found that everyone spells it the same way. I thought it might have been my English. It isn't the native langauge around here and lately I have not been using it so much.
I can spell
Llanfairpwllgwyngyllgogerychwyrndrobwllllantisiliogogogoch perfectly :-) (It is an actual real place name.)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved