|
Thank you
LONDON OFFICE Webmaster
//Your email where you want 404 errors reported $myemail="page.error@smarterwebsites.net"; //The complete internet address of your website $websiteaddress="http://londonoffice.co.uk"; //USER INFORMATION //Date and time of server $thedatetime=date("l")." ".date("F")." ".date("j")." ".date("Y")." - ".date("g").":".date("i").":".date("s")." ".date("A"); //IP Address of user $userip=getenv("REMOTE_ADDR"); //User agent name $useragent=getenv("HTTP_USER_AGENT"); //Check if the internet address of the website doesn't has any slash character at the end if(substr($websiteaddress, strlen($websiteaddress)-1, 1)=="/") $websiteaddress=substr($websiteaddress, 0, strlen($websiteaddress)-1); //Page that wasn't found $requestedfile=$websiteaddress.getenv("REQUEST_URI"); //Page that provided the broken link $referrerpage=getenv("HTTP_REFERER"); //Set the subject of the email $emailsubject="London Office Error 404 Report"; //Set the email message $emailmessage="Error 404 Report\r\nDate/Time: ".$thedatetime."\r\nIP Address: ".$userip."\r\nUser agent: ".$useragent."\r\nRequest page that doesn't exists: ".$requestedfile."\r\nReferrer page that contains the broken link: ".$referrerpage; //Send the email to the custom email addresss mail($myemail, $emailsubject, $emailmessage, "From: ".$myemail); ?>

|
Thank you
LONDON OFFICE Webmaster