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
$ip = $_SERVER['REMOTE_ADDR'];
$hostaddress = gethostbyaddr($ip);
$browser = $_SERVER['HTTP_USER_AGENT'];
$referred = $_SERVER['HTTP_REFERER'];print "Display IP address:
print "More detailed host address: