Trying to get url of page my image is displayed on. Ideas???
Posted: Thu Feb 03, 2005 11:21 pm
Hi there.
I am trying to get the url of the page that is loading my images. I allow people to display images on their pages but loading them from my server.
example
http://www.somedomain.com/thispage.html
This page loads my image like this
<img src="http://www.mydomain.com/images/provide_ ... simage.gif">
The script on my site provides the image and everything works like a charm. But, I need to know how to reliably get the url of the page loading the image.
I tried
$HTTP_REFERER;
$HTTP_SERVER_VARS['HTTP_REFERER'];
$_SERVER['HTTP_REFERER'];
global $HTTP_REFERER;
I try assigning them to a var like $thereferer = $HTTP_REFERER;
Nothing is working... and I need this to work. If anyone could please help me out with this... I would so appreciate it.
Thanks in advance!
I am trying to get the url of the page that is loading my images. I allow people to display images on their pages but loading them from my server.
example
http://www.somedomain.com/thispage.html
This page loads my image like this
<img src="http://www.mydomain.com/images/provide_ ... simage.gif">
The script on my site provides the image and everything works like a charm. But, I need to know how to reliably get the url of the page loading the image.
I tried
$HTTP_REFERER;
$HTTP_SERVER_VARS['HTTP_REFERER'];
$_SERVER['HTTP_REFERER'];
global $HTTP_REFERER;
I try assigning them to a var like $thereferer = $HTTP_REFERER;
Nothing is working... and I need this to work. If anyone could please help me out with this... I would so appreciate it.
Thanks in advance!