Poor man's view of the world

This is a very simple php code for a displaying visitor IP, browser and OS information.

To see a working demo of this code, visit: http://www.rohasnagpal.com/projects/ip


$hostaddress = gethostbyaddr($ip);
$browser = $_SERVER['HTTP_USER_AGENT'];
$referred = $_SERVER['HTTP_REFERER'];print "Display IP address:
print "$ip\n";
print "More detailed host address:
print "$hostaddress

print "Display browser info:
print "$browser

print "Where you came from (if you clicked on a link to get here:
if ($referred == "") {
print "Page was directly requested";
else {
print "$referred";