Shoutbox

php help: http_referer - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: php help: http_referer (/showthread.php?tid=86461)

php help: http_referer by .Roy on 10-07-2008 at 08:58 AM

what i want to do is:

IF HTTP_REFERER = specific ip-address (coming from a specific website/server)

do something

else

do something else.

what's the php code for this
please help ^^.


RE: php help: http_referer by MeEtc on 10-07-2008 at 05:38 PM

The variable name you're looking for is $_SERVER['HTTP_REFERER']

Just remember that the same webpage can have more than one URL (with or without www, trailing slash, GET variables etc)

Try making a page with print_r($_SERVER) in it too, to see all of the various ptions available. Be caucious however, this list of variables changes depending on the versoon of apache and OS type