mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-03 01:03:28 +09:00
Update core classes to refer to UA class for robot detection
This commit is contained in:
parent
f1441613a2
commit
37bce0343d
5 changed files with 17 additions and 93 deletions
|
|
@ -999,8 +999,7 @@ function json_encode2($data)
|
|||
*/
|
||||
function isCrawler($agent = NULL)
|
||||
{
|
||||
$agent = $agent ?: $_SERVER['HTTP_USER_AGENT'];
|
||||
return (bool)preg_match('@bot|crawl|sp[iy]der|https?://|google|yahoo|slurp|yeti|daum|teoma|fish|hanrss|facebook|yandex|infoseek|askjeeves|stackrambler@i', $agent);
|
||||
return Rhymix\Framework\UA::isRobot($agent);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue