I have a script that's supposed to detect the url of its caller website. If the caller is another website, it should give something like
http://callersite.com. I'm using this line of php code (though I suspect this won't matter for sysadmins)
I'm testing with a caller site that's hosted on hostgator. What I'm noticing though is that I don't get
callersite.com, I get something like
1a.12.12ab.static.theplanet.com. I don't know what
theplanet.com is and why I'm not getting
Also what do I need to do to really get the domain of the site making a call to my script?
Thanks for the explanation. Some have advised I use
$_SERVER['HTTP_REFERER'] but it's not what I'm after. My script acts as an API. Another website makes a curl request to it and gets an output and later on presents it to the user. So http referrer gives
false since the caller site.com is making a direct call to me. So any hope?