Page 1 of 1

viewres previous page

Posted: Mon Oct 04, 2004 10:01 pm
by marker5a
Ok
I am writing a script, and I was wondering if there was a way to get the viewers previous page. For instance, lets say I was at google.com, and decided to go to this certain page, I would want the script to echo the http://www.google.com. Anyone know how?

Chris

Posted: Mon Oct 04, 2004 10:08 pm
by feyd
$_SERVER['HTTP_REFERER']

however, do not bank on the variable existing.. as a lot of browsers, firewalls, proxies, and maybe even ISPs are starting to not send that header.

Posted: Mon Oct 04, 2004 10:11 pm
by marker5a
I tried that and I kept getting the url of the script page. Anyways, I think I found another way to do this. Thanks though

Chris