Search code examples
phpgdparent

PHP Detect parent image user url


I have a php file that outputs a image with dynamic content.
I need to get the url of the img using it. Example: www.bla.com/

<img src="signature.php?color=black">


The php would return www.bla.com/
Can I do this WITHOUT using GET vars and php on the img page?


Solution

  • Thanks to @Terminus for helping, my solution was to use:

    $_SERVER["HTTP_REFERER"]
    

    Then do some sanitizing just in case.