Ok, I have been trying to figure out for two weeks how to track the URLs that are calling my script on my domain. If they were all on the same server, it would be much easier - but there are a bunch of people calling this script from a lot of different domains.
What I really need, is when they call the script, the script runs and the first thing the script does is save the URL of the page that called it. For example:
// this is where the PHP program is called from
http: // www.testdomain.com/index.php
... and ...
// this is the PHP program
http: // www.programdomain.com/program.php
INDEX.PHP
---------------
<HTML><BODY>Test<br></body></html>
<?php require("http://www.programdomain.com/program.php"); ?>
PROGRAM.PHP
------------------
echo "this is where I would need to track who called me...";
echo "in other words, testdomain.com/index.php";
echo "just asked me to run.";
echo "and then do some more stuff afterwards...";
I have tried several different methods. First I tried using a "require", but since they are across different domains the variables don't stick. You can see that test here:
http://www.phpbuilder.com/board/showthread.php?s=&postid=10431994
Second, I tried the technique of calling the script as if it were a PNG/Image file, like I saw in the AXS script (calling a .PL file as an image...). However, I could not get this to work. You can see that example here.
http://www.phpbuilder.com/board/showthread.php?s=&postid=10432309
I'm really stuck here. What am I doing wrong?
Take care,
... Christopher @ Snowburst