Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Bot.php
Go to the documentation of this file.
1 <?php
21 #require_once 'Zend/Http/UserAgent/AbstractDevice.php';
22 
34 {
35 
41  protected static $_uaSignatures = array(
42  // The most common ones.
43  'googlebot',
44  'msnbot',
45  'slurp',
46  'yahoo',
47 
48  // The rest, alphabetically.
49  'alexa',
50  'appie',
51  'archiver',
52  'ask jeeves',
53  'baiduspider',
54  'bot',
55  'crawl',
56  'crawler',
57  'curl',
58  'eventbox',
59  'facebookexternal',
60  'fast',
61  'feedfetcher-google',
62  'firefly',
63  'froogle',
64  'gigabot',
65  'girafabot',
66  'google',
67  'htdig',
68  'infoseek',
69  'inktomi',
70  'java',
71  'larbin',
72  'looksmart',
73  'mechanize',
74  'mediapartners-google',
75  'monitor',
76  'nambu',
77  'nationaldirectory',
78  'novarra',
79  'pear',
80  'perl',
81  'python',
82  'rabaz',
83  'radian',
84  'rankivabot',
85  'scooter',
86  'sogou web spider',
87  'spade',
88  'sphere',
89  'spider',
90  'technoratisnoop',
91  'tecnoseek',
92  'teoma',
93  'toolbar',
94  'transcoder',
95  'twitt',
96  'url_spider_sql',
97  'webalta crawler',
98  'webbug',
99  'webfindbot',
100  'wordpress',
101  'www.galaxy.com',
102  'yahoo! searchmonkey',
103  'yahoo! slurp',
104  'yandex',
105  'zyborg',
106  );
107 
115  public static function match($userAgent, $server)
116  {
117  return self::_matchAgentAgainstSignatures($userAgent, self::$_uaSignatures);
118  }
119 
125  public function getType()
126  {
127  return 'bot';
128  }
129 }
static _matchAgentAgainstSignatures($userAgent, $signatures)
static $_uaSignatures
Definition: Bot.php:41
static match($userAgent, $server)
Definition: Bot.php:115