$ipresult = "They Be: ". $_SERVER["REMOTE_ADDR"];
if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) {
$ipresult = "They Be: ". $_SERVER["REMOTE_ADDR"] . "\n.... However 'x_forwarded_for' was set so they may be going through a proxy, if thats the case then: they be: " . $_SERVER["HTTP_X_FORWARDED_FOR"];
}
$hua = $_SERVER["HTTP_USER_AGENT"];
$message ="OOOH look! \n The site was accessed from... \n $ipresult \n $hua \n :D \n";
#mail ("ant@manchestermonkey.co.uk","manchestermonkey", $message, "From: \"mcrmonkey\" ");
?>
ManchesterMonkey