don't detect IE as a bot
[php-utility-classes.git] / include / classes / useragent.php-class
CommitLineData
31733e08 1<?php
2class userAgent {
3 // userAgent PHP class
4 // get user agent and tell us what Browser is accessing
5 //
1defa974 6 // function userAgent([$ua_string])
7 // CONSTRUCTOR; reads UA string (or takes the optional given UA string) and gets info from that into our variables.
31733e08 8 //
9 // var $uastring
10 // the plain User Agent string
11 // var $brand
12 // returns the User Agent brand name
13 // var $version
14 // the User Agent version
a8464009 15 // var $bot
16 // bool: true if this agent is a bot
31733e08 17 //
23585ba2 18 // function getBrand()
19 // returns the User Agent Brand Name
20 // function getVersion()
21 // returns the User Agent version
22 //
a8464009 23 // function isbot()
24 // returns true if User Agent seems to be a bot
31733e08 25 // function isns()
26 // returns true if User Agent seems to be Netscape brand, false if not
27 // function isns4()
28 // returns true if User Agent seems to be Netscape Communicator 4.x, false if not
29 // function isie()
30 // returns true if User Agent seems to be a version of Internet Exploder, false if not
31 // function geckobased()
32 // returns true if User Agent seems to be a Gecko-based browser, false if not
33 // function geckodate()
34 // returns the Gecko date when it's a Gecko-based browser, 0 if not
1defa974 35 // function khtmlbased()
36 // returns true if User Agent seems to be a KHTML-based browser, false if not
37
38 // collection of some known User Agent Strings:
39 // Mozilla/5.0 (compatible; Konqueror/3; Linux 2.4.18; X11; i686)
40 // Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.3b) Gecko/20030114
41 // Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt)
42 // Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)
43 // Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
44 // Mozilla/4.75 [de] (Win98; U)
45 // Opera/5.12 (Windows 2000; U) [de]
46 // Mozilla/5.0 (Windows; U; Win 9x 4.90; de-DE; m18) Gecko/20010131 Netscape6/6.01
47 // Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.0.1) Gecko/20020823 Netscape/7.0
48 // Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/51 (like Gecko) Safari/51
49 // Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6g
50 // Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.1) Gecko/20021109 Chimera/0.6+
51 // Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.3a) Gecko/20021207 Phoenix/0.5
52 // Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20021204
53 // Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 6.05 [ja]
54 // Mozilla/4.0 (compatible; MSIE 5.12; Mac_PowerPC) OmniWeb/4.1.1-v424.6
23585ba2 55 // Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6
56 // Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1
a8464009 57 // Python-urllib/1.15
58 // *** search bots: ***
59 // Scooter/3.3
60 // Spinne/2.0 med_AH
61 // Vagabondo/2.0 MT (webagent at wise-guys dot nl)
62 // TurnitinBot/1.5 ( ">http://www.turnitin.com/robot/crawlerinfo.html)
63 // FAST-WebCrawler/3.x Multimedia (mm dash crawler at fast dot no)
64 // Firefly/1.0 (compatible; Mozilla 4.0; MSIE 5.5)
65 // Googlebot/2.1 (+ ">http://www.googlebot.com/bot.html)
66 // Scrubby/2.2 ( ">http://www.scrubtheweb.com/)
67 // psbot/0.1 (+ ">http://www.picsearch.com/bot.html)
68 // NG/1.0
69 // URL_Spider_Pro/3.0 ( ">http://www.innerprise.net/usp-spider.asp)"
70 // Pompos/1.3 ">http://dir.com/pompos.html
71 // Szukacz/1.5 (robot; www.szukacz.pl/jakdzialarobot.html; info@szukacz.pl)
72 // ASPseek/1.2.10
73 // NPBot-1/2.0
74 // NetResearchServer/2.7(loopimprovements.com/robot.html)
75 // dloader(NaverRobot)/1.0
76 // Mozilla/4.0 compatible ZyBorg/1.0 Daily Refresh Beta-d03 (wn.zyborg@looksmart.net;
77 // Mozilla/2.0 (compatible; Ask Jeeves/Teoma)
78 // Mozilla/5.0 (Slurp/si; slurp@inktomi.com; ">http://www.inktomi.com/slurp.html)
79 // Mozilla/5.0 [en] (compatible; Gulper Web Bot 0.2.4 www.ecsl.cs.sunysb.edu/~maxim/cgi-bin/Link/GulperBot)
80 // Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; Girafabot; girafabot at girafa dot com;
81 // Mozilla/4.0 (efp@gmx.net)
82 // Mozilla/4.5 (compatible; HTTrack 3.0x; Windows 98)
83 // PingALink Monitoring Services 1.0 (http://www.pingalink.com)
84 // IlTrovatore-Setaccio (+ ">http://www.iltrovatore.it)
85 // Mercator-2.0
86 // appie 1.1 (www.walhello.com)
87 // larbin_2.6.2 (larbin2.6.2@unspecified.mail)
88 // OWR_Crawler 0.1
89 // search.ch V1.4.2 (spiderman@search.ch;
90 // WebFilter Robot 1.0
91 // Openfind data gatherer, Openbot/3.0+(robot-response@openfind.com.tw;+
92 // LinkWalker
93 // Internet Explorer 5.5
94 // BaiDuSpider
95 // Mozilla/4.0 (compatible; B-l-i-t-z-B-O-T)
96 // B l i t z B O T @ t r i c u s . n e t (Mozilla compatible)
97 // sitecheck.internetseer.com (For more info see: ">http://sitecheck.internetseer.com)
98