<?PHP

$agent[] = getenv('HTTP_USER_AGENT');

#$agent[] = "Mozilla/4.7 [en] (Win98; I)";
#$agent[] = "Mozilla/4.0 (compatible; MSIE 5.0; AOL 6.0; Windows 98; DigExt)";
#$agent[] = "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; AT&T WNS5.0; 2DigExt)";
#$agent[] = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705)";
#$agent[] = "Mozilla/4.0 (compatible; MSIE 5.0; AOL 6.0; Windows 98; DigExt)";
#$agent[] = "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)";	
#$agent[] = "Mozilla/5.0 (Windows 2000; U) Opera 5.12  [en]"; 
#$agent[] = "Mozilla/5.0 (Windows 2000; U) Opera 6.04 [en]";
#$agent[] = "Opera/5.12 (Windows 2000; U)  [en]";
#$agent[] = "Mozilla/4.7 [en] (WinNT; I)";
#$agent[] = "Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3";
#$agent[] = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461)";
#$agent[] = "Mozilla/4.0 (compatible; MSIE 5.5; AOL 7.0; Windows 98; Win 9x 4.90)";
#$agent[] = "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95)";
#$agent[] = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)";

#Linux
#$agent[] = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011014";
#$agent[] = "Lynx/2.8.4rel.1 libwww-FM/2.14";
#$agent[] = "Opera/5.0 (Linux 2.4.7-10 i686; U)  [en]";
#$agent[] = "Mozilla/5.0 (X11; U; Linux i686; en-US; Nautilus/1.0Final) Gecko/20020513";
#$agent[] = "Mozilla/5.0 Galeon/1.2.0 (X11; Linux i686; U;) Gecko/20020509";
#$agent[] = "Elinks (0.3; Linux 2.4.18-3smp i686)";
#$agent[] = "Mozilla/3.0 (compatible; NetPositive/2.2)";
#$agent[] = "Mozilla/5.0 (campatible; Konqueror/3.0.0-10; Linux)";

#Fake
#$agent[] = "This isn't real";

#mac
#$agent[] = "Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.1b) Gecko/20020722";
#$agent[] = "Mozilla/4.79 (Macintosh; U; PPC)";
#$agent[] = "Mozilla/4.0 (compatible; MSIE 5.14; Mac_PowerPC)";
#$agent[] = "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/73 (KHTML, like Gecko) Safari/73";

if (sizeof($agent)>1) {
	for ($i=1;$i<sizeof($agent);$i++) {
		$array[] = $agent[$i];
	}
	$agent = $array;
}

include("agent.inc");

foreach ($agent as $agent_string) {
	print "You've connected to Gcount using: <B>$agent_string</B><br>";

	$item = parseagent($agent_string);

	print "Which Gcount thinks is:<P>
	OS: <B>$item[0]</B> Ver: <B>$item[1]</B><BR>
	Browser: <B>$item[2]</B> Ver: <B>$item[3]</B><BR><BR>";
}

?>
