Page 1 of 1
How can you get the referring URL in PHP?
Posted: Thu Apr 25, 2002 2:07 pm
by MattSharp
Just wondering how you do this in PHP? Thanks.....
Posted: Thu Apr 25, 2002 2:35 pm
by Craig
$HTTP_REFERER
Posted: Thu Apr 25, 2002 2:35 pm
by angelorigo
$HTTP_REFERER ?!?
Posted: Thu Apr 25, 2002 2:45 pm
by Zmodem
Use this to find the referer
Code: Select all
$HTTP_SERVER_VARSї'HTTP_REFERER'] // PHP <= 4.06
$_SERVERї'HTTP_REFERER'] // PHP >= 4.1.0
HTTP_SERVER_VARS and _SERVER are the same thing. They are just an array that holds a wide variety of data about the users browser and other useful things. See
http://www.php.net/manual/en/reserved.variables.php for more details
--cheers
Posted: Thu Apr 25, 2002 2:55 pm
by MattSharp
Yea I should have thought of that, thanks d00d......