Welcome to WebmasterWorld Guest from 54.166.222.116

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

problem with $_SERVER['HTTP_REFERRER']

Why does it display nothing?

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

10+ Year Member



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?

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

WebmasterWorld Senior Member 10+ Year Member



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...
1:37 pm on Mar 14, 2004 (gmt 0)

10+ Year Member



Hi Neil,

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

:-)

Regards,
R.

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

WebmasterWorld Senior Member 10+ Year Member



The manual shows it with one (R).

$_SERVER['HTTP_REFERER']

[php.net...]

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

WebmasterWorld Senior Member 10+ Year Member



Nice catch, romeo!
7:13 pm on Mar 14, 2004 (gmt 0)

10+ Year Member



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>.
7:33 pm on Mar 14, 2004 (gmt 0)

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.
8:16 pm on Mar 14, 2004 (gmt 0)

10+ Year Member



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.)
 

Featured Threads

Hot Threads This Week

Hot Threads This Month