Hello, I'm trying to find code where I can track 404 errors either by logging to a file or by e-mailing me the error. This should include the referring info etc... Thanks
Not sure why, though, but anyway. Check PHP's reserved variables. From there you can get the referrer, the IP, Request URI, etc... Then create a string with the variables and use either the mail() function to mail it to you, or the file_put_contents() function to save it locally. Oh yes, and use htaccess to create your custom 404 page which logs the stuff. ErrorDocument 404 /404.php Code (markup):