I wanted a way to automatically submit to the e404.php page the bad link, and the refering page (if available).
The only way I could figure out how to do this was using REDIRECT_URL and HTTP_REFERER in the meta tag.
- Code: Select all
<meta http-equiv="refresh" content="0;
url=/e404.php?request=<!--#echo var="REDIRECT_URL" -->&refer=<!--#echo var="HTTP_REFERER" -->">
There must be a better way that this.
It leads to a second problem in the following hp page when I use the $_GET['refer'] to pull the referring page down.
If the link hosting site is google or yahoo with a bad link (which it invariabley is then $_GET['refer'] contains all sorts of punctuation that stops the script.
So the script can't send an email me telling me which links are out of date and where those links are hosted.
This is only a problem when linking from google and yahoo but hopefully can be overcome
- Code: Select all
$message = "
." Page:\r\n http://www.{$_SERVER['SERVER_NAME']}{$_GET['request']}\r\n"
." Referring Page: {$_GET['refer']}\r\n"
help would be nice
thanks
edd

