+ $this->bot = false;
+ }
+ elseif (preg_match('|Konqueror/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'Konqueror';
+ $this->version = $regs[1];
+ $this->bot = false;
+ }
+ elseif (preg_match('|Safari/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'Safari';
+ $this->version = $regs[1];
+ $this->bot = false;
+ }
+ elseif (preg_match('|AppleWebKit/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'AppleWebKit';
+ $this->version = $regs[1];
+ $this->bot = false;
+ }
+ elseif (preg_match('|MSFrontPage/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'Microsoft FrontPage';
+ $this->version = $regs[1];
+ $this->bot = false;
+ }
+ elseif (preg_match('|iCab[/ ]([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'iCab';
+ $this->version = $regs[1];
+ $this->bot = false;
+ }
+ elseif (preg_match('|IBrowse[/ ]([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'IBrowse';
+ $this->version = $regs[1];
+ $this->bot = false;
+ }
+ elseif (preg_match('|Configuration/CLDC-([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'CLDC';
+ $this->version = $regs[1];
+ $this->bot = false;
+ }
+ elseif (preg_match('|UP.Browser/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'UP.Browser';
+ $this->version = $regs[1];
+ $this->bot = false;
+ }
+ elseif (preg_match('|ELinks \(([0-9a-zA-Z\.+]+);|', $this->uastring, $regs)) {
+ $this->brand = 'ELinks';
+ $this->version = $regs[1];
+ $this->bot = false;
+ }
+ elseif (preg_match('|Links \(([0-9a-zA-Z\.+]+);|', $this->uastring, $regs)) {
+ $this->brand = 'Links';
+ $this->version = $regs[1];
+ $this->bot = false;
+ }
+ elseif (preg_match('|wget[/ ]([0-9a-zA-Z\.+]+)|i', $this->uastring, $regs)) {
+ $this->brand = 'wget';
+ $this->version = $regs[1];
+ $this->bot = false;
+ }
+ 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|', $this->uastring, $regs)) {
+ $this->brand = 'Slurp';
+ $this->version = null;
+ $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('|([0-9a-zA-Z\.+]+)_AC-Plug|', $this->uastring, $regs)) {
+ $this->brand = 'AC-Plug';
+ $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('|42_HAL|', $this->uastring)) {
+ $this->brand = '42_HAL';
+ $this->version = null;
+ $this->bot = true;
+ }
+ elseif (preg_match('|Baiduspider|i', $this->uastring)) {
+ $this->brand = 'BaiDuSpider';
+ $this->version = null;
+ $this->bot = true;
+ }
+ elseif (preg_match('|Indy Library|', $this->uastring)) {
+ $this->brand = 'Indy Library';
+ $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('|Steganos Internet Anonym([0-9a-zA-Z\. +]*)|', $this->uastring, $regs)) {
+ $this->brand = 'Steganos Internet Anonym';
+ $this->version = $regs[1];
+ $this->bot = false;
+ }
+ elseif (preg_match('|Avant Browser[^/]|', $this->uastring)) {
+ $this->brand = 'Avant Browser';
+ $this->version = null;
+ $this->bot = false;
+ }
+ elseif (preg_match('|Maxthon|', $this->uastring)) {
+ $this->brand = 'Maxthon';
+ $this->version = null;
+ $this->bot = false;
+ }
+ elseif (preg_match('|MyIE2|', $this->uastring)) {
+ $this->brand = 'MyIE2';
+ $this->version = null;
+ $this->bot = false;
+ }
+ elseif (preg_match('|Crazy Browser ([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'Crazy Browser';
+ $this->version = $regs[1];
+ $this->bot = false;
+ }
+ elseif (preg_match('|AvantGo ([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'AvantGo';
+ $this->version = $regs[1];
+ $this->bot = false;
+ }
+ elseif (preg_match('|MSN ([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'MSN';
+ $this->version = $regs[1];
+ $this->bot = false;
+ }
+ elseif (preg_match('|MS FrontPage ([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'Microsoft FrontPage';
+ $this->version = $regs[1];
+ $this->bot = false;
+ }
+ elseif (preg_match('|MSIE ([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
+ $this->brand = 'Microsoft Internet Explorer';
+ $this->version = $regs[1];
+ $this->bot = false;
+ }
+ elseif (preg_match('|Mozilla/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs) && (strpos($this->uastring, 'compatible;') === false) && (strpos($this->uastring, 'Gecko/') === false)) {
+ $this->brand = 'Netscape';
+ $this->version = $regs[1];
+ if (intval($this->version) == 4) { $this->brand .= ' Communicator'; }
+ $this->bot = false;
+ }
+ elseif (preg_match('|Mozilla/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs) && (strpos($this->uastring, 'compatible;') !== false)) {
+ $this->brand = 'Mozilla-compatible (unknown)';
+ $this->version = null;
+ $this->bot = false;
+ }
+
+ $botArray = array('Scooter','Spinne','Vagabondo','Firefly','Scrubby','NG','Pompos','Szukacz','ASPseek',
+ 'NetResearchServer','LinkWalker','Zeus','W3C_Validator','ZyBorg','Ask Jeeves','ia_archiver',
+ 'PingALink Monitoring Services','IlTrovatore-Setaccio','Nutch','Mercator','search.ch',
+ 'appie','larbin','NutchCVS','ObjectsSearch','Webchat','Mediapartners-Google','Schmozilla',
+ 'FavOrg','findlinks','DataCha0s','','','','','','','','','');
+
+ if (in_array($this->brand, $botArray)) {
+ $this->bot = true;