From 38123d976bdb3a8fa30dbe5341e52eb6f96d61d6 Mon Sep 17 00:00:00 2001 From: Robert Kaiser Date: Tue, 2 Jun 2015 21:44:41 +0200 Subject: [PATCH] add Firefox for iOS detection --- include/classes/useragent.php-class | 6 ++++++ testbed/ua_list_raw.txt | 1 + 2 files changed, 7 insertions(+) diff --git a/include/classes/useragent.php-class b/include/classes/useragent.php-class index a70915d..22dc491 100755 --- a/include/classes/useragent.php-class +++ b/include/classes/useragent.php-class @@ -410,6 +410,12 @@ class userAgent { $this->bot = true; $this->mobile = true; } + elseif (preg_match('|FxiOS/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) { + $this->brand = 'Firefox for iOS'; + $this->version = $regs[1]; + $this->bot = false; + $this->mobile = true; + } elseif (preg_match('|Safari/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) { if (preg_match('| Mobile(/[0-9a-zA-Z\.+]+)? ?Safari/|', $this->uastring)) { $this->brand = 'Mobile Safari'; diff --git a/testbed/ua_list_raw.txt b/testbed/ua_list_raw.txt index 40c1c4d..4ba4102 100755 --- a/testbed/ua_list_raw.txt +++ b/testbed/ua_list_raw.txt @@ -187,6 +187,7 @@ Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-us) AppleWebKit/533.20.25 ( Mozilla/5.0 (iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10 Mozilla/5.0 (iPod; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5 Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3 +Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) FxiOS/1.0 Mobile/12F69 Safari/600.1.4 Mozilla/5.0 (Linux; U; Android 2.1-update1; de-de; HTC Desire 1.19.161.5 Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17 Mozilla/5.0 (Linux; U; Android 2.2.1; fr-ch; A43 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 Mozilla/5.0 (BlackBerry; U; BlackBerry 9860; en-GB) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.296 Mobile Safari/534.11+ -- 2.43.0