Codice PHP:
$browsers = array(
'MSIE 2' => 'Internet Explorer 2',
'MSIE 3' => 'Internet Explorer 3',
'MSIE 4.5' => 'Internet Explorer 4.5',
'MSIE 4' => 'Internet Explorer 4',
'MSIE 5.5' => 'Internet Explorer 5.5',
'MSIE 5' => 'Internet Explorer 5',
'MSIE 6.0' => 'Internet Explorer 6',
'Lynx' => 'Lynx',
'Links' => 'Links',
'amaya' => 'Amaya',
'Konqueror' => 'Konqueror',
'Epiphany' => 'Epiphany',
'Galeon' => 'Galeon',
'Avant Browser' => 'Avant Browser',
'Googlebot' => 'Googlebot',
'Safari' => 'Safari',
'Wget' => 'Wget',
'Opera/7' => 'Opera 7',
'Opera 7' => 'Opera 7',
'Opera/6' => 'Opera 6',
'Opera 6' => 'Opera 6',
'Opera/5' => 'Opera 5',
'Opera 5' => 'Opera 5',
'Netscape/7' => 'Netscape 7',
'Netscape7' => 'Netscape 7',
'Netscape/6' => 'Netscape 6',
'Netscape6' => 'Netscape 6',
'Netscape/5' => 'Netscape 5',
'Mozilla/4' => 'Netscape 4',
'Mozilla/3' => 'Netscape 3',
'Firebird' => 'Mozilla',
'Firefox' => 'Firefox',
'Mozilla' => 'Mozilla');
$so = array(
'Windows 3.1' => 'Windows 3.1',
'Windows 95' => 'Windows 95',
'Windows 98' => 'Windows 98',
'Windows NT 4.0' => 'Windows ME',
'WinNT4.0' => 'Windows ME',
'Windows NT 5.0' => 'Windows 2000',
'Windows NT 5.1; SV1' => 'Windows Xp Sp2',
'Windows NT 5.1' => 'Windows Xp',
'Ace Explorer' => 'Windows',
'Advanced Browser' => 'Windows',
'Win32' => 'Windows',
'PalmOS' => 'PalmOS',
'Macintosh' => 'Macintosh',
'SunOS' => 'SunOS',
'Linux' => 'Linux',
'w3m' =>'Linux',
'Konqueror' => 'Linux');