define("EMAIL_ADDRESS", "webmaster@eldarea.de"); define("DOCROOT", "http://www.eldarea.de"); define("SUBJECT", "404 Error Report on Eldarea.de"); define("ABS_PATH", "/home/eldarea-de/htdocs/"); function send_email() { global $REQUEST_URI, $HTTP_REFERER, $REMOTE_ADDR; $message .= "404 Error Report\n\nA 404 error was encountered by $REMOTE_ADDR"; $message .= " on ".date("w, F dS, Y").".\n\n"; $message .= "The URL which generated the error is: \n".DOCROOT."$REQUEST_URI\n\n"; $message .= "The referring page was:\n$HTTP_REFERER\n\n"; mail(EMAIL_ADDRESS, SUBJECT, $message, "From: ".EMAIL_ADDRESS); return; } ?>
Error 404: File Not FoundThe URL path in your request was not found on this server. This may have several reasons: The document you requested is outdated and no longer available on this server. There was a mispelled link somewhere on the web page you came from. Maybe you simply typed in the wrong URL. if ($refdoc = substr($HTTP_REFERER,strlen(DOCROOT)) && file_exists(ABS_PATH.$refdoc)) { #send_email(); echo("\n"); echo("An error report has been automatically sent to the webmaster.\n"); echo(" \n"); } else { echo("\n"); echo("Please report this error to the webmaster of the site you came from, if possible.\n"); echo(" \n"); } ?>
|