AgentUtils
A utility class for carrying out various tasks on HTTP user agent strings.
Tags
Table of Contents
- $bots : array<string|int, mixed>
- An array of partial user agent strings belonging to well known web spider bots.
- isBot() : bool
- Static method to check if the provided user agent string matches any of the known user agent strings in the $bots array on this class.
Properties
$bots
An array of partial user agent strings belonging to well known web spider bots.
private
static array<string|int, mixed>
$bots
= array('ia_archiver', 'Scooter/', 'Ask Jeeves', 'Baiduspider+(', 'bingbot/', 'Disqus/', 'Exabot/', 'FAST Enterprise Crawler', 'FAST-WebCrawler/', 'http://www.neomo.de/', 'Gigabot/', 'Mediapartners-Google', 'Google Desktop', 'Feedfetcher-Google', 'Googlebot', 'heise-IT-Markt-Crawler', 'heritrix/1.', 'ibm.com/cs/crawler', 'ICCrawler - ICjobs', 'ichiro/2', 'MJ12bot/', 'MetagerBot/', 'msnbot-NewsBlogs/', 'msnbot/', 'msnbot-media/', 'NG-Search/', 'http://lucene.apache.org/nutch/', 'NutchCVS/', 'OmniExplorer_Bot/', 'online link validator', 'psbot/0', 'Seekbot/', 'Sensis Web Crawler', 'SEO search Crawler/', 'Seoma [SEO Crawler]', 'SEOsearch/', 'Snappy/1.1 ( http://www.urltrends.com/ )', 'http://www.tkl.iis.u-tokyo.ac.jp/~crawler/', 'SynooBot/', 'crawleradmin.t-info@telekom.de', 'TurnitinBot/', 'voyager/1.0', 'W3 SiteSearch Crawler', 'W3C-checklink/', 'W3C_*Validator', 'http://www.WISEnutbot.com', 'yacybot', 'Yahoo-MMCrawler/', 'Yahoo! DE Slurp', 'Yahoo! Slurp', 'YahooSeeker/')
Tags
Methods
isBot()
Static method to check if the provided user agent string matches any of the known user agent strings in the $bots array on this class.
public
static isBot(string $userAgent) : bool
Parameters
- $userAgent : string
-
The user agent string that we want to check.