+ }
+ elseif (preg_match('|Configuration/CLDC-([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'CLDC';
+ $this->version = $regs[1];
+ }
+ elseif (preg_match('|ELinks \(([0-9a-zA-Z\.+]+);|', $this->uastring, $regs)) {
+ $this->brand = 'ELinks';
+ $this->version = $regs[1];
+ }
+ elseif (preg_match('|ZyBorg/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'ZyBorg';
+ $this->version = $regs[1];
+ $this->bot = true;
+ }
+ elseif (preg_match('|Googlebot/?([0-9a-zA-Z\.+]+)?|', $this->uastring, $regs)) {
+ $this->brand = 'Googlebot';
+ $this->version = $regs[1];
+ $this->bot = true;
+ }
+ elseif (preg_match('|Ask Jeeves/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'Ask Jeeves';
+ $this->version = $regs[1];
+ $this->bot = true;
+ }
+ elseif (preg_match('|Slurp/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'Slurp';
+ $this->version = $regs[1];
+ $this->bot = true;
+ }
+ elseif (preg_match('|Gulper Web Bot ([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'Gulper Web Bot';
+ $this->version = $regs[1];
+ $this->bot = true;
+ }
+ elseif (preg_match('|HTTrack ([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'HTTrack';
+ $this->version = $regs[1];
+ $this->bot = true;
+ }
+ elseif (preg_match('|^Internet Explorer 5.5|', $this->uastring)) {
+ $this->brand = 'Unknown bot (IE5.5)';
+ $this->version = null;
+ $this->bot = true;
+ }
+ elseif (preg_match('|^Mozilla[\s ]*$|', $this->uastring)) {
+ $this->brand = 'Unknown bot (Mozilla)';
+ $this->version = null;
+ $this->bot = true;
+ }
+ elseif (preg_match('|http://www.almaden.ibm.com/cs/crawler|', $this->uastring)) {
+ $this->brand = 'almaden crawler';
+ $this->version = null;
+ $this->bot = true;
+ }
+ elseif (preg_match('|B-l-i-t-z-B-O-T|', $this->uastring) || preg_match('|B l i t z B O T @ t r i c u s . n e t|', $this->uastring)) {
+ $this->brand = 'BlitzBOT';
+ $this->version = null;
+ $this->bot = true;
+ }
+ elseif (preg_match('|sitecheck.internetseer.com|', $this->uastring)) {
+ $this->brand = 'internetseer';
+ $this->version = null;
+ $this->bot = true;
+ }
+ elseif (preg_match('|Girafabot|', $this->uastring)) {
+ $this->brand = 'Girafabot';
+ $this->version = null;
+ $this->bot = true;
+ }
+ elseif (preg_match('|efp@gmx.net|', $this->uastring)) {
+ $this->brand = 'efp';
+ $this->version = null;
+ $this->bot = true;
+ }
+ elseif (preg_match('|^Firefly|', $this->uastring)) {
+ // comes here with correct value but would be detected as MSIE
+ }
+ elseif (preg_match('|Avant Browser[^/]|', $this->uastring)) {
+ $this->brand = 'Avant Browser';
+ $this->version = null;
+ }
+ elseif (preg_match('|Crazy Browser ([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'Crazy Browser';
+ $this->version = $regs[1];
+ }
+ elseif (preg_match('|AOL ([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'AOL';
+ $this->version = $regs[1];
+ }
+ elseif (preg_match('|MSN ([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'MSN';
+ $this->version = $regs[1];
+ }
+ elseif (preg_match('|MS FrontPage ([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'Microsoft FrontPage';
+ $this->version = $regs[1];
+ }
+ elseif (preg_match('|MSIE ([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'Microsoft Internet Explorer';
+ $this->version = $regs[1];
+ }
+ elseif (preg_match('|Mozilla/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs) && !strstr($this->uastring, "compatible;") && !strstr($this->uastring, "Gecko/")) {
+ $this->brand = 'Netscape';
+ $this->version = $regs[1];
+ if (intval($this->version) == 4) { $this->brand .= ' Communicator'; }
+ }
+
+ $botArray = array('Scooter','Spinne','Vagabondo','TurnitinBot','FAST-WebCrawler','Firefly','Googlebot',
+ 'Scrubby','psbot','NG','URL_Spider_Pro','Pompos','Szukacz','ASPseek','NPBot-1',
+ 'dloader(NaverRobot)','NetResearchServer','HeinrichderMiragoRobot','LinkWalker',
+ 'Openbot','W3C_Validator','ZyBorg','Ask Jeeves','dumbBot','BaiDuSpider','ia_archiver',
+ 'PingALink Monitoring Services','IlTrovatore-Setaccio','Nutch','Mercator','OWR_Crawler',
+ 'search.ch','WebFilter Robot','appie','larbin','','','','','','','','');
+
+ if (in_array($this->brand, $botArray)) {
+ $this->bot = true;