I wanted to pass along some slight modifications I have made to my index.php file residing in my bot trap directory:


// IMMEDIATELY BELOW THE FOLLOWING CODE:

// if bot is unique, send email and log entry
if ($badbot == 0) { // check for unlisted bot
global $msg, $target;

// AND IMMEDIATELY ABOVE THE FOLLOWING CODE:

$message .= "Whois Lookup: " . "\n";
$message .= "\n" . $msg . "\n";
mail($recipient, $subject, $message, "From: $sender"); // send email

// REPRESENTS THE MODIFICATIONS I MADE - WHICH ARE AS FOLLOWS:

$hourdiff = "+1"; // hours diff btwn server and local time
$datetime = date("l, F d Y h:i A",time() + ($hourdiff * 3600));

$sender = "sysadmin@mydomain.com";
$recipient = "sysadmin@ mydomain.com";
$subject = "Bad Bot Alert!";

// $message = $datestamp . "\n\n";

$message = "IP Address: " . $_SERVER['REMOTE_ADDR'] . "\n\n";

$message .= "Date/Time: $datetime CT\n\n"; // Custom Addition by Dave Roberts

$message .= "User Agent: " . $_SERVER['HTTP_USER_AGENT'] . "\n\n";

$message .= "Host: " . $_SERVER['HTTP_HOST'] . "\n\n"; // Custom Addition by Dave Roberts

$message .= "HTTP Connection: " . $_SERVER['HTTP_CONNECTION'] . "\n\n"; // Custom Addition by Dave Roberts

$message .= "Gateway Interface: " . $_SERVER['GATEWAY_INTERFACE'] . "\n\n"; // Custom Addition by Dave Roberts

$message .= "Request Method: " . $_SERVER['REQUEST_METHOD'] . "\n\n"; // Custom Addition by Dave Roberts

$message .= "URL Request: " . $_SERVER['REQUEST_URI'] . "\n\n";

$message .= "Referer: " . $_SERVER['HTTP_REFERER'] . "\n\n"; // Custom Addition by Dave Roberts

$message .= "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n"; // Custom Addition by Dave Roberts

$message .= "Online IP Query Tools:\n\n"; // Custom Addition by Dave Roberts

$message .= "http://www.geobytes.com/IpLocator.htm?GetLocation&IpAddress=" . $_SERVER['REMOTE_ADDR'] . "\n\n"; // Custom Addition by Dave Roberts

$message .= "http://whois.domaintools.com/" . $_SERVER['REMOTE_ADDR'] . "\n\n"; // Custom Addition by Dave Roberts

$message .= "http://www.ip-adress.com/ip_tracer/" . $_SERVER['REMOTE_ADDR'] . "\n\n"; // Custom Addition by Dave Roberts

$message .= "http://safeweb.norton.com/report/show?name=" . $_SERVER['REMOTE_ADDR'] . "\n\n"; // Custom Addition by Dave Roberts

$message .= "http://www.programmer.lt/en/geoip/?q=" . $_SERVER['REMOTE_ADDR'] . "\n\n"; // Custom Addition by Dave Roberts

$message .= "http://www.ipinfodb.com/ip_locator.php?ip=" . $_SERVER['REMOTE_ADDR'] . "\n\n"; // Custom Addition by Dave Roberts

$message .= "http://projecthoneypot.org/ip_" . $_SERVER['REMOTE_ADDR'] . "\n\n"; // Custom Addition by Dave Roberts

$message .= "http://www.ipchecking.com/?ip=" . $_SERVER['REMOTE_ADDR'] . "\n\n"; // Custom Addition by Dave Roberts

$message .= "http://user-agent-string.info/list-of-ua/bots-ip?" . $_SERVER['REMOTE_ADDR'] . "\n\n"; // Custom Addition by Dave Roberts

$message .= "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n"; // Custom Addition by Dave Roberts