detekce prohlížeče
4 příspěvky
Archiv diskusního fóra
Fórum je uzavřené a slouží pouze ke čtení. Některé informace mohou být zastaralé.
-
Kolegové odborníci, máte někdo spolehlivý skript na detekci prohlížeče, včetně aktuálních verzí. Potřeboval bych hlavně oddělit IE6 od ostatních kvůli správnému nastavení alternativních stylů. Jak je na tom funkce Get_Browser() a její zdrojový soubor browscap.ini tu na wz? Dá se někde stáhnout jeho aktuální verze? Prosím poraďte.
-
http://interval.cz/clanek.asp?article=1188
-
to jsem četl když to před dvěma lety vyšlo :o)
-
Tak si udelej zaznamy z HTTP_USER_AGENT a po case si z nej vyfiltruj prohlizece. Ti nabidnu svuj, ale neni aktualni, ale pro soucasnost to bude staci a navic z toho muzes i vyjit. Parametrem je HTTP_USER_AGENT nebo jeho podpis. Vystupem je nazev prohlizece. function ZjistiProhl($user_agent) { if (EregI("opera", $user_agent)) $typprohl = "Opera"; elseif (EregI("MSIE 4", $user_agent)) $typprohl = "MS Internet Explorer 4"; elseif (EregI("MSIE 5", $user_agent)) $typprohl = "MS Internet Explorer 5"; elseif (EregI("MSIE 6", $user_agent)) $typprohl = "MS Internet Explorer 6"; elseif (EregI("Gecko", $user_agent)) { if (EregI("Netscape", $user_agent)) $typprohl = "Netscape (Gecko)"; elseif (EregI("Galeon", $user_agent)) $typprohl = "Galeon"; elseif (EregI("Firefox", $user_agent)) $typprohl = "Firefox"; elseif (EregI("Safari", $user_agent)) $typprohl = "Safari"; elseif (EregI("Phoenix", $user_agent)) $typprohl = "Phoenix (Mozilla)"; else $typprohl = "Mozilla"; } elseif (EregI("Lynx", $user_agent)) $typprohl = "Lynx"; elseif (EregI("Links", $user_agent)) $typprohl = "Links (ELinks)"; elseif (EregI("Mozilla/4.5", $user_agent)) $typprohl = "Netscape (4.x)"; elseif (EregI("Mozilla/4.7", $user_agent)) $typprohl = "Netscape (4.x)"; elseif (EregI("Mozilla/4.8", $user_agent)) $typprohl = "Netscape (4.x)"; elseif (EregI("Konqueror", $user_agent)) $typprohl = "Konqueror"; elseif (EregI("Teleport", $user_agent)) $typprohl = "Teleport Pro"; elseif (EregI("WinHttp", $user_agent)) $typprohl = "WinHttpRequest"; elseif (EregI("WebCopier", $user_agent)) $typprohl = "WebCopier"; elseif (EregI("Web Downloader", $user_agent)) $typprohl = "Web Downloader"; elseif (EregI("Offline Explorer", $user_agent)) $typprohl = "Offline Explorer"; elseif (EregI("HTTrack", $user_agent)) $typprohl = "HTTrack"; else $typprohl = "(neznamy)"; return $typprohl; }