Forum Moderators: coopster

Message Too Old, No Replies

Getting referer of script in PHP

Need to find url of site which called my script

         

defireman

7:08 pm on Nov 7, 2005 (gmt 0)

10+ Year Member



I need to obtain the URL of the site that called one of my scripts. My code on client side looks like this:

<SCRIPT type="text/javascript" src="http://example.com/scripts/apiscript.php?key=[hash of site]">

on server side, what do I have to do to get the referer (calling url), so that I can use it to calcuate the required hash?

Thanks a lot!

Gibble

7:18 pm on Nov 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Check
$_SERVER['HTTP_REFERER']

sunveria

11:16 am on Nov 22, 2005 (gmt 0)

10+ Year Member



yes.....
using $HTTP_REFERER ....
check out the manual..

^ ^