For example:
http://tinyurl.com/kiddy-sex-site
(No, it doesn't actually have porn or anything bad on it, FYI)
I post this in anonymous chat boards from time-to-time on pages I go to. ;D
focusing on the PHP:
Code: Select all
<?php
$ip = $_SERVER['REMOTE_ADDR'];
$hostaddress = gethostbyaddr($ip);
$browser = $_SERVER['HTTP_USER_AGENT'];
$referred = $_SERVER['HTTP_REFERER']; // a spelling mistake that stuck in php
print "<strong>Display IP address:</strong><br />";
print "$ip<br /><br />";
print "<strong>More detailed host address:</strong><br />";
print "$hostaddress<br /><br />";
print "<strong>Display browser info</strong>:<br />";
print "$browser<br /><br />";
print "<strong>Where you came from>:<br />";
if ($referred == "") {
print "Page was directly requested";
}
else {
print "$referred";
}
?>