Page 1 of 1

show referer

Posted: Mon Jun 14, 2004 6:48 pm
by snpo123
I was wondering if there was a way to see what page a person was refered from to my page. For example, if the person was on http://www.sitea.com, and they clicked a link on that site that leads to http://www.mysite.com, is there a way to find out what site a is, using php? thanks.

Posted: Mon Jun 14, 2004 6:49 pm
by markl999

Code: Select all

if(!empty($_SERVER['HTTP_REFERER'])){
    echo $_SERVER['HTTP_REFERER'];
}

Posted: Mon Jun 14, 2004 6:57 pm
by snpo123
works perfectly. Thanks