X-Git-Url: https://git-public.kairo.at/?p=php-utility-classes.git;a=blobdiff_plain;f=include%2Fclasses%2Fuseragent.php-class;h=e71505a73c533c8e6a5693dbade5cc7370230597;hp=9a28094682a406b42f56d74eb369eb99cec62c04;hb=208cf8374e858cef5cc6ca2a304145dcf4e37fdd;hpb=588763e6abf20ff0134126764ce05f54f35961d8 diff --git a/include/classes/useragent.php-class b/include/classes/useragent.php-class index 9a28094..e71505a 100755 --- a/include/classes/useragent.php-class +++ b/include/classes/useragent.php-class @@ -164,6 +164,11 @@ class userAgent { $this->version = $regs[1]; $this->bot = false; } + elseif (preg_match('|Navigator/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) { + $this->brand = 'Netscape'; + $this->version = $regs[1]; + $this->bot = false; + } elseif (preg_match('|Chimera/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) { $this->brand = 'Chimera'; $this->version = $regs[1]; @@ -189,11 +194,6 @@ class userAgent { $this->version = $regs[1]; $this->bot = false; } - elseif (preg_match('|Firefox/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) { - $this->brand = 'Firefox'; - $this->version = $regs[1]; - $this->bot = false; - } elseif (preg_match('|SeaMonkey/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) { $this->brand = 'SeaMonkey'; $this->version = $regs[1]; @@ -209,6 +209,16 @@ class userAgent { $this->version = $regs[1]; $this->bot = false; } + elseif (preg_match('|Minefield/([0-9a-zA-Z\.+]+)|i', $this->uastring, $regs)) { + $this->brand = 'Minefield'; + $this->version = $regs[1]; + $this->bot = false; + } + elseif (preg_match('|Minimo/([0-9a-zA-Z\.+]+)|i', $this->uastring, $regs)) { + $this->brand = 'Minimo'; + $this->version = $regs[1]; + $this->bot = false; + } elseif (preg_match('|Galeon/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) { $this->brand = 'Galeon'; $this->version = $regs[1]; @@ -229,18 +239,6 @@ class userAgent { $this->version = $regs[1]; $this->bot = false; } - elseif (preg_match('|rv:([0-9a-zA-Z\.+]+)|', $this->uastring, $regs) && - strstr($this->uastring, "Mozilla/") && strstr($this->uastring, "Gecko/")) { - $this->brand = 'Mozilla'; - $this->version = $regs[1]; - $this->bot = false; - } - elseif (preg_match('|m([0-9]+)\)|', $this->uastring, $regs) && - strstr($this->uastring, "Mozilla/") && strstr($this->uastring, "Gecko/")) { - $this->brand = 'Mozilla'; - $this->version = 'M'.$regs[1]; - $this->bot = false; - } elseif (preg_match('|Opera\/([^\(]+) \(.*; Opera Mini; |', $this->uastring, $regs)) { $this->brand = 'Opera Mini'; $this->version = $regs[1]; @@ -286,6 +284,23 @@ class userAgent { $this->version = $regs[1]; $this->bot = false; } + elseif (preg_match('|Firefox/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) { + $this->brand = 'Firefox'; + $this->version = $regs[1]; + $this->bot = false; + } + elseif (preg_match('|rv:([0-9a-zA-Z\.+]+)|', $this->uastring, $regs) && + strstr($this->uastring, "Mozilla/") && strstr($this->uastring, "Gecko/")) { + $this->brand = 'Mozilla'; + $this->version = $regs[1]; + $this->bot = false; + } + elseif (preg_match('|m([0-9]+)\)|', $this->uastring, $regs) && + strstr($this->uastring, "Mozilla/") && strstr($this->uastring, "Gecko/")) { + $this->brand = 'Mozilla'; + $this->version = 'M'.$regs[1]; + $this->bot = false; + } elseif (preg_match('|MSFrontPage/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) { $this->brand = 'Microsoft FrontPage'; $this->version = $regs[1];