From 8cdd62dcfefecb63e0b7d744d0a01fea11df1607 Mon Sep 17 00:00:00 2001 From: Zhai Yiming Date: Fri, 14 Jul 2017 10:58:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=88=AC=E8=99=AB=E7=89=88=E6=9C=AC=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Access_UA.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Access_UA.php b/Access_UA.php index 051828e..ffc0560 100644 --- a/Access_UA.php +++ b/Access_UA.php @@ -102,14 +102,13 @@ class Access_UA { if ($this->robotID === null) { if (!empty($this->ua)) { - if (preg_match('#([a-zA-Z0-9]+\s*(?:bot|spider))[ /]*([0-9.]*)#i', $this->ua, $matches)) { + if (preg_match('#([a-zA-Z0-9]+\s*(?:bot|spider))[ /v]*([0-9.]*)#i', $this->ua, $matches)) { $this->robotID = $this->robotName = $matches[1]; $this->robotVersion = $matches[2]; } foreach (self::$robots as $val) { if (strpos($this->ual, $this->filter($val)) !== false) { $this->robotID = $this->robotName = $val; - $this->robotVersion = ''; } } }