I am having no end of bad luck getting the refering page returned, the issue may be that I am doing redirects using javascript if a document is not loaded correctly. // // test and redirect if needed // <script language="JavaScript" > <!--/ if (window != parent) top.location.href = location.href; function checkref() { if (document.referrer != ("http://groups.msn.com/CastleOfDarkDesiresDreams/annex.msnw")) window.location = "http://coddad.thepumas.net/errors/403-50.php"; } //--> </script>
How would i get the page that sent someone to the error screen?? Both the $_SERVER and getenv calls to HTTP_REFERER return either empty or something undefined.. this code has no effect with or without the getenv capitalized $refpage=GETENV('HTTP_REFERER'); if ($repage = ""){ $refpage="Direct Hit"; } and if I try the same thing but with $refpage=$_SERVER["HTTP_REFERER"]; if ($repage = ""){ $refpage="Direct Hit"; } I get the following notice on the screen when the script is run Notice: Undefined index: HTTP_REFERER in E:\coddad\errors\403-50.php on line 28 regards Jon -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php