Search code examples
phpimagetrackback

Retrieve backlink infos from linked image generated by php


This time ask you this question:

Assuming we have this img ( generated by php ) linked in clients sites

<img src="http://mysite.com/genimg.php?id=2" alt=""/>

Is Possible to get back from the client location some infos!? ( es. client url )

PS:

  1. don't need something that open the entire client page and search for link!
  2. don't need something that work just if the link image is clicked!

Solution

  • You can figure out everything from $_SERVER global variable in your genimg.php, just as a normal script would.

    For example, use $_SERVER['REMOTE_HOST'] to determine the host name from which the user is viewing the current page (in your case, loading the image). See more details in the manual.