no, nevim, do jake miry se v tom vyznas, ale asi takto:
ve $line mám načten řádek ze souboru mého logovacího systému, kde je uložen user_agent
// Prohlizec:
if(strstr($line, "Safari")) { $info['browser']['Safari']['count']++; $info['browser']['Safari']['name'] = "Safari"; $info['browser']['Safari']['logy'][] = $files[$i]; }
elseif(strstr($line, "Firefox/1.0.4")) { $info['browser']['Firefox/1.0.4']['count']++; $info['browser']['Firefox/1.0.4']['name'] = "Firefox_1.0.4"; $info['browser']['Firefox/1.0.4']['logy'][] = $files[$i]; }
elseif(strstr($line, "Firefox/1.0.5")) { $info['browser']['Firefox/1.0.5']['count']++; $info['browser']['Firefox/1.0.5']['name'] = "Firefox_1.0.5"; $info['browser']['Firefox/1.0.5']['logy'][] = $files[$i]; }
elseif(strstr($line, "Firefox/1.0.6")) { $info['browser']['Firefox/1.0.6']['count']++; $info['browser']['Firefox/1.0.6']['name'] = "Firefox_1.0.6"; $info['browser']['Firefox/1.0.6']['logy'][] = $files[$i]; }
elseif(strstr($line, "Firefox")) { $info['browser']['Firefox']['count']++; $info['browser']['Firefox']['name'] = "Firefox"; $info['browser']['Firefox']['logy'][] = $files[$i]; }
elseif(strstr($line, "Mozilla/5.0") && strstr($line, "Gecko")) { $info['browser']['Mozilla']['count']++; $info['browser']['Mozilla']['name'] = "Mozilla"; $info['browser']['Mozilla']['logy'][] = $files[$i]; }
elseif(strstr($line, "Netscape")) { $info['browser']['Netscape']['count']++; $info['browser']['Netscape']['name'] = "Netscape"; $info['browser']['Netscape']['logy'][] = $files[$i]; }
elseif(strstr($line, "Opera/8.02")) { $info['browser']['Opera/8.02']['count']++; $info['browser']['Opera/8.02']['name'] = "Opera_8.02"; $info['browser']['Opera/8.02']['logy'][] = $files[$i]; }
elseif(strstr($line, "Opera/8.0")) { $info['browser']['Opera/8.0']['count']++; $info['browser']['Opera/8.0']['name'] = "Opera_8.0"; $info['browser']['Opera/8.0']['logy'][] = $files[$i]; }
elseif(strstr($line, "Opera/8.10")) { $info['browser']['Opera/8.10']['count']++; $info['browser']['Opera/8.10']['name'] = "Opera_8.10"; $info['browser']['Opera/8.10']['logy'][] = $files[$i]; }
elseif(strstr($line, "Opera")) { $info['browser']['Opera']['count']++; $info['browser']['Opera']['name'] = "Opera"; $info['browser']['Opera']['logy'][] = $files[$i]; }
elseif(strstr($line, "MSIE 6.0")) { $info['browser']['MSIE_6.0']['count']++; $info['browser']['MSIE_6.0']['name'] = "MSIE_6.0"; $info['browser']['MSIE_6.0']['logy'][] = $files[$i]; }
elseif(strstr($line, "MSIE 5.5")) { $info['browser']['MSIE_5.5']['count']++; $info['browser']['MSIE_5.5']['name'] = "MSIE_5.5"; $info['browser']['MSIE_5.5']['logy'][] = $files[$i]; }
elseif(strstr($line, "MSIE 5.0")) { $info['browser']['MSIE_5.0']['count']++; $info['browser']['MSIE_5.0']['name'] = "MSIE_5.0"; $info['browser']['MSIE_5.0']['logy'][] = $files[$i]; }
elseif(strstr($line, "MSIE")) { $info['browser']['MSIE']['count']++; $info['browser']['MSIE']['name'] = "MSIE"; $info['browser']['MSIE']['logy'][] = $files[$i]; }
elseif(strstr($line, "Lynx")) { $info['browser']['Lynx']['count']++; $info['browser']['Lynx']['name'] = "Lynx"; $info['browser']['Lynx']['logy'][] = $files[$i]; }
elseif(strstr($line, "Konqueror")) { $info['browser']['Konqueror']['count']++; $info['browser']['Konqueror']['name'] = "Konqueror"; $info['browser']['Konqueror']['logy'][] = $files[$i]; }
elseif(strstr($line, "Epiphany")) { $info['browser']['']['count']++; $info['browser']['Epiphany']['name'] = "Epiphany"; $info['browser']['Epiphany']['logy'][] = $files[$i]; }
elseif(strstr($line, "SAGEM")) { $info['browser']['SAGEM']['count']++; $info['browser']['SAGEM']['name'] = "SAGEM"; $info['browser']['SAGEM']['logy'][] = $files[$i]; }
elseif(strstr($line, "Nokia6600/1.0")) { $info['browser']['Nokia6600/1.0']['count']++; $info['browser']['Nokia6600/1.0']['name'] = "Nokia6600_1.0"; $info['browser']['Nokia6600/1.0']['logy'][] = $files[$i]; }
elseif(strstr($line, "SeznamBot/1.0")) { $info['browser']['SeznamBot/1.0']['count']++; $info['browser']['SeznamBot/1.0']['name'] = "SeznamBot_1.0"; $info['browser']['SeznamBot/1.0']['logy'][] = $files[$i]; }
elseif(strstr($line, "Googlebot/2.1")) { $info['browser']['Googlebot/2.1']['count']++; $info['browser']['Googlebot/2.1']['name'] = "Googlebot_2.1"; $info['browser']['Googlebot/2.1']['logy'][] = $files[$i]; }
elseif(strstr($line, "Mediapartners-Google/2.1")) { $info['browser']['Mediapartners-Google/2.1']['count']++; $info['browser']['Mediapartners-Google/2.1']['name'] = "Mediapartners-Google_2.1"; $info['browser']['Mediapartners-Google/2.1']['logy'][] = $files[$i]; }
elseif(strstr($line, "msnbot/1.0")) { $info['browser']['msnbot/1.0']['count']++; $info['browser']['msnbot/1.0']['name'] = "msnbot_1.0"; $info['browser']['msnbot/1.0']['logy'][] = $files[$i]; }
elseif(strstr($line, "Jyxobot/1")) { $info['browser']['Jyxobot/1']['count']++; $info['browser']['Jyxobot/1']['name'] = "Jyxobot_1"; $info['browser']['Jyxobot/1']['logy'][] = $files[$i]; }
elseif(strstr($line, "Yahoo!")) { $info['browser']['Yahoo!']['count']++; $info['browser']['Yahoo!']['name'] = "Yahoo"; $info['browser']['Yahoo!']['logy'][] = $files[$i]; }
elseif(strstr($line, "holmes/3.6")) { $info['browser']['holmes/3.6']['count']++; $info['browser']['holmes/3.6']['name'] = "holmes_3.6"; $info['browser']['holmes/3.6']['logy'][] = $files[$i]; }
elseif(strstr($line, "AIBOT")) { $info['browser']['AIBOT']['count']++; $info['browser']['AIBOT']['name'] = "AIBOT"; $info['browser']['AIBOT']['logy'][] = $files[$i]; }
elseif(strstr($line, "snbot")) { $info['browser']['snbot']['count']++; $info['browser']['snbot']['name'] = "Snbot"; $info['browser']['Snbot']['logy'][] = $files[$i]; }
elseif(strstr($line, "Exabot")) { $info['browser']['Exabot']['count']++; $info['browser']['Exabot']['name'] = "Exabot"; $info['browser']['Exabot']['logy'][] = $files[$i]; }
elseif(strstr($line, "ZyBorg/1.0")) { $info['browser']['ZyBorg/1.0']['count']++; $info['browser']['ZyBorg/1.0']['name'] = "ZyBorg_1.0"; $info['browser']['ZyBorg/1.0']['logy'][] = $files[$i]; }
elseif(strstr($line, "W3C_Validator")) { $info['browser']['W3C_Validator']['count']++; $info['browser']['W3C_Validator']['name'] = "W3C_Validator"; $info['browser']['W3C_Validator']['logy'][] = $files[$i]; }
else { $info['browser']['Unknown']['count']++; $info['browser']['Unknown']['name'] = "Neznámý"; $info['browser']['Unknown']['logy'][] = $files[$i];
/*$info['browser']['$line']['count']++; $info['browser']['$line']['name'] = "$line";*/ }
ale tak ono to - kromě toho že to rozliší prohlížeče - taky započítává jejich opakování pro následnou jednoduchou statistiku a taky ukládá název souboru s ikonou pro daný prohlížeč (mám ty ststistiky s obrázky)... a jinak kdyby se nazalamovaly ty řádky, tak to má poloviční délku...
jo a taky část s roboty, což možná nepotřebuješ, není zanedbatelná