mirror of
https://github.com/kokororin/typecho-plugin-Access.git
synced 2025-01-04 09:20:46 +08:00
Update Access_Parser.php
添加YisouSpider(神马搜索)的识别 修正对Microsoft Edge浏览器的识别
This commit is contained in:
parent
f4983c3150
commit
ef23655285
@ -50,6 +50,7 @@ class Access_Parser
|
||||
'Fish search',
|
||||
'crawler',
|
||||
'bingbot',
|
||||
'YisouSpider',
|
||||
);
|
||||
|
||||
protected $currentBot = null;
|
||||
@ -97,6 +98,9 @@ class Access_Parser
|
||||
$browser = '360浏览器 ' . $matches[1];
|
||||
} elseif (preg_match('#Maxthon( |\/)([a-zA-Z0-9.]+)#i', $ua, $matches)) {
|
||||
$browser = 'Maxthon ' . $matches[2];
|
||||
} elseif (preg_match('#Edge/([a-zA-Z0-9.]+)#i', $ua, $matches)) {
|
||||
//Win10中Microsoft Edge浏览器
|
||||
$browser = 'Edge ' . $matches[1];
|
||||
} elseif (preg_match('#Chrome/([a-zA-Z0-9.]+)#i', $ua, $matches)) {
|
||||
$browser = 'Chrome ' . $matches[1];
|
||||
} elseif (preg_match('#XiaoMi/MiuiBrowser/([0-9.]+)#i', $ua, $matches)) {
|
||||
@ -116,9 +120,6 @@ class Access_Parser
|
||||
$browser = 'Internet Explorer ' . $matches[1];
|
||||
} elseif (preg_match('#Trident#', $ua, $matches)) {
|
||||
$browser = 'Internet Explorer 11';
|
||||
} elseif (preg_match('#Edge/12.0#i', $ua, $matches)) {
|
||||
//win10中spartan浏览器
|
||||
$browser = 'Spartan';
|
||||
} elseif (preg_match('#(Firefox|Phoenix|Firebird|BonEcho|GranParadiso|Minefield|Iceweasel)/([a-zA-Z0-9.]+)#i', $ua, $matches)) {
|
||||
$browser = 'Firefox ' . $matches[2];
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user