X-Git-Url: https://git-public.kairo.at/?p=php-utility-classes.git;a=blobdiff_plain;f=include%2Fclasses%2Fuseragent.php-class;h=f5353338126647c0d30b56d19125f89897cf7957;hp=d060a6246a0a5aadd29d0406f9a36bf1b2a64725;hb=09cd2756641d8b8e3ce6f4dc79a23ecd2affb214;hpb=f9a0c27d72955f610860bf7be800e89e002114d1 diff --git a/include/classes/useragent.php-class b/include/classes/useragent.php-class index d060a62..f535333 100755 --- a/include/classes/useragent.php-class +++ b/include/classes/useragent.php-class @@ -217,6 +217,11 @@ class userAgent { $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[ /]([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) { $this->brand = 'Opera'; $this->version = $regs[1]; @@ -539,6 +544,11 @@ class userAgent { $this->uadata['lang'] = $regs[3]; $this->uadata['eng_version'] = 'M'.$regs[4]; } + elseif (preg_match('|Mozilla/5.0 \(([^;]+); [^;]+; ([^;]+); m([^\);]+)\)|', $this->uastring, $regs)) { + $this->uadata['os'] = $regs[1]; + $this->uadata['lang'] = $regs[2]; + $this->uadata['eng_version'] = 'M'.$regs[3]; + } elseif (preg_match('|Mozilla/5.0 \(([^;]+); [^;]+; ([^;]+); ([^\);]+)\)|', $this->uastring, $regs)) { $this->uadata['os'] = $regs[2]; $this->uadata['lang'] = $regs[3];