Question

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!
Was it helpful?

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top