There is a web page from a different domain that includes a script that is hosted and generated in my server. Say that page is in http://www.theirdomain.com/site and its markup is like this:
<html>
<head>
<script src="http://www.mydomain.com/script.php"></script>
</head>
<body>
...
</body>
</html>
The script.php page does create and the JavaScript contents, but I want to know which is the URL that called script.php (i.e. http://www.theirdomain.com/site).
How can I get that info in PHP?
$_SERVER[‘HTTP_REFERER’] not 100% reliable.