I have this webpage at:

http://www.domainX.com/test.html?id=6

which is calling an external php script with the following tag:

<img src="http://www.domainXYZ.com/track.php">

Inside track.php I want to be able to get the HOST + PAGE + QUERY STRING from the FIRST domain but it seems that with $_SESSION["HTTP_HOST"] I can only get the domain where track.php is hosted.

Is there any solution for this?

Thanks!

    Hi,
    You need to add som othe info in the img src...
    something like

     
    <img src="http://www.domainXYZ.com/track.php?src=<?=$PHP_SELF?>"> 

    This give you in the track.php the var $src with wanted info...

    I hope this helps...

    bye bye

      I don't what it to become PHP dependent because I want to use this tracking script in cross-platform enviroments.

        Well, before pointing out the obvious fact that PHP is a fairly cross-platform language...

        What are you using that you would need it to be "cross-platform", or more importantly, not dependant upon PHP.

        Are you using ASP, Perl, ColdFusion...maybe Cobol?! 😃 😃

        Tell us what you've got, and we'll probably have an easier time answering this.

          Write a Reply...