ipchicken clone code
I used this one my personal site but since it mimics ipchicken I guess its a clone. The script makes use of the php auto global $_SERVER. It stores the stuff the browser sends to the server when it makes a request to a page.
$ip = $_SERVER["REMOTE_ADDR"];
$port = substr($_SERVER["REMOTE_PORT"],0,2);
$browser = $_SERVER["HTTP_USER_AGENT"];
$hostname = gethostbyaddr($ip);
echo " " . $browser;
echo " " . $hostname;
echo " " . $port;
You dont need to use it in the same sense as the above its just a ready made example you can copy and paste and run. If your pretty good with regex you can even broaden it to show only the browser and browser version. If you do it I'd be interested in seeing how you did it. You can optionally use:
$browser = get_browser(null, true);
but you need to edit your config file to point to the browsercap.ini file on your server.