Forum Moderators: coopster
<?php
header('Status: 404 Not Found', null, 404);
$from_header = "From: 404@example.com\r\n";
$to = "404@example.com";
$subject = "404 Error";
$today = date("D M j Y g:i:s a T");
$ip = getenv ("REMOTE_ADDR");
$requri = getenv ("REQUEST_URI");
$servname = getenv ("SERVER_NAME");
$pageload = $ip . " tried to load http://" . $servname . $requri ;
$httpagent = getenv ("HTTP_USER_AGENT");
$httpref = getenv ("HTTP_REFERER");
$message = "$today \n\n$pageload \n\nUser Agent = $httpagent \n\n$httpref ";
mail($to, $subject, $message, $from_header);
?> I wonder about how to troubleshoot this.