← All changes
|
includes/classes/RobotDetector/RobotDetector.php
+318
-318
1.5.8
→
2.0.2
View file →
| @@ -1,318 +1,318 @@ | ||
| 1 | -<?php | |
| 2 | - | |
| 3 | -class RobotDetector { | |
| 4 | - private $robots = array( | |
| 5 | - 'abcdatos' => true, | |
| 6 | - 'acme-spider' => true, | |
| 7 | - 'ahoythehomepagefinder' => true, | |
| 8 | - 'Alkaline' => true, | |
| 9 | - 'anthill' => true, | |
| 10 | - 'appie' => true, | |
| 11 | - 'arachnophilia' => true, | |
| 12 | - 'arale' => true, | |
| 13 | - 'araneo' => true, | |
| 14 | - 'araybot' => true, | |
| 15 | - 'architext' => true, | |
| 16 | - 'aretha' => true, | |
| 17 | - 'ariadne' => true, | |
| 18 | - 'arks' => true, | |
| 19 | - 'aspider' => true, | |
| 20 | - 'atn' => true, | |
| 21 | - 'atomz' => true, | |
| 22 | - 'auresys' => true, | |
| 23 | - 'backrub' => true, | |
| 24 | - 'bayspider' => true, | |
| 25 | - 'bbot' => true, | |
| 26 | - 'bigbrother' => true, | |
| 27 | - 'bingbot' => true, | |
| 28 | - 'bjaaland' => true, | |
| 29 | - 'blackwidow' => true, | |
| 30 | - 'blindekuh' => true, | |
| 31 | - 'Bloodhound' => true, | |
| 32 | - 'borg-bot' => true, | |
| 33 | - 'boxseabot' => true, | |
| 34 | - 'brightnet' => true, | |
| 35 | - 'bspider' => true, | |
| 36 | - 'cactvschemistryspider' => true, | |
| 37 | - 'calif' => true, | |
| 38 | - 'curl' => true, | |
| 39 | - 'cassandra' => true, | |
| 40 | - 'cgireader' => true, | |
| 41 | - 'checkbot' => true, | |
| 42 | - 'christcrawler' => true, | |
| 43 | - 'churl' => true, | |
| 44 | - 'cienciaficcion' => true, | |
| 45 | - 'cmc' => true, | |
| 46 | - 'Collective' => true, | |
| 47 | - 'combine' => true, | |
| 48 | - 'confuzzledbot' => true, | |
| 49 | - 'coolbot' => true, | |
| 50 | - 'core' => true, | |
| 51 | - 'cosmos' => true, | |
| 52 | - 'cruiser' => true, | |
| 53 | - 'cusco' => true, | |
| 54 | - 'cyberspyder' => true, | |
| 55 | - 'cydralspider' => true, | |
| 56 | - 'desertrealm' => true, | |
| 57 | - 'deweb' => true, | |
| 58 | - 'dienstspider' => true, | |
| 59 | - 'digger' => true, | |
| 60 | - 'diibot' => true, | |
| 61 | - 'directhit' => true, | |
| 62 | - 'dnabot' => true, | |
| 63 | - 'download_express' => true, | |
| 64 | - 'dragonbot' => true, | |
| 65 | - 'dwcp' => true, | |
| 66 | - 'e-collector' => true, | |
| 67 | - 'ebiness' => true, | |
| 68 | - 'eit' => true, | |
| 69 | - 'elfinbot' => true, | |
| 70 | - 'emacs' => true, | |
| 71 | - 'emcspider' => true, | |
| 72 | - 'esculapio' => true, | |
| 73 | - 'esther' => true, | |
| 74 | - 'evliyacelebi' => true, | |
| 75 | - 'nzexplorer' => true, | |
| 76 | - 'fastcrawler' => true, | |
| 77 | - 'fdse' => true, | |
| 78 | - 'felix' => true, | |
| 79 | - 'ferret' => true, | |
| 80 | - 'fetchrover' => true, | |
| 81 | - 'fido' => true, | |
| 82 | - 'finnish' => true, | |
| 83 | - 'fireball' => true, | |
| 84 | - 'fish' => true, | |
| 85 | - 'fouineur' => true, | |
| 86 | - 'francoroute' => true, | |
| 87 | - 'freecrawl' => true, | |
| 88 | - 'funnelweb' => true, | |
| 89 | - 'gama' => true, | |
| 90 | - 'gazz' => true, | |
| 91 | - 'gcreep' => true, | |
| 92 | - 'getbot' => true, | |
| 93 | - 'geturl' => true, | |
| 94 | - 'golem' => true, | |
| 95 | - 'googlebot' => true, | |
| 96 | - 'grapnel' => true, | |
| 97 | - 'griffon' => true, | |
| 98 | - 'gromit' => true, | |
| 99 | - 'gulliver' => true, | |
| 100 | - 'gulperbot' => true, | |
| 101 | - 'hambot' => true, | |
| 102 | - 'harvest' => true, | |
| 103 | - 'havindex' => true, | |
| 104 | - 'hi' => true, | |
| 105 | - 'hometown' => true, | |
| 106 | - 'wired-digital' => true, | |
| 107 | - 'htdig' => true, | |
| 108 | - 'htmlgobble' => true, | |
| 109 | - 'hyperdecontextualizer' => true, | |
| 110 | - 'iajabot' => true, | |
| 111 | - 'ibm' => true, | |
| 112 | - 'iconoclast' => true, | |
| 113 | - 'Ilse' => true, | |
| 114 | - 'imagelock' => true, | |
| 115 | - 'incywincy' => true, | |
| 116 | - 'informant' => true, | |
| 117 | - 'infoseek' => true, | |
| 118 | - 'infoseeksidewinder' => true, | |
| 119 | - 'infospider' => true, | |
| 120 | - 'inspectorwww' => true, | |
| 121 | - 'intelliagent' => true, | |
| 122 | - 'irobot' => true, | |
| 123 | - 'iron33' => true, | |
| 124 | - 'israelisearch' => true, | |
| 125 | - 'javabee' => true, | |
| 126 | - 'JBot' => true, | |
| 127 | - 'jcrawler' => true, | |
| 128 | - 'askjeeves' => true, | |
| 129 | - 'jobo' => true, | |
| 130 | - 'jobot' => true, | |
| 131 | - 'joebot' => true, | |
| 132 | - 'jubii' => true, | |
| 133 | - 'jumpstation' => true, | |
| 134 | - 'kapsi' => true, | |
| 135 | - 'katipo' => true, | |
| 136 | - 'kdd' => true, | |
| 137 | - 'kilroy' => true, | |
| 138 | - 'ko_yappo_robot' => true, | |
| 139 | - 'larbin' => true, | |
| 140 | - 'legs' => true, | |
| 141 | - 'linkidator' => true, | |
| 142 | - 'linkscan' => true, | |
| 143 | - 'linkwalker' => true, | |
| 144 | - 'lockon' => true, | |
| 145 | - 'lycos' => true, | |
| 146 | - 'macworm' => true, | |
| 147 | - 'magpie' => true, | |
| 148 | - 'marvin' => true, | |
| 149 | - 'mattie' => true, | |
| 150 | - 'mediafox' => true, | |
| 151 | - 'merzscope' => true, | |
| 152 | - 'meshexplorer' => true, | |
| 153 | - 'MindCrawler' => true, | |
| 154 | - 'mnogosearch' => true, | |
| 155 | - 'moget' => true, | |
| 156 | - 'momspider' => true, | |
| 157 | - 'monster' => true, | |
| 158 | - 'motor' => true, | |
| 159 | - 'msnbot' => true, | |
| 160 | - 'muncher' => true, | |
| 161 | - 'muninn' => true, | |
| 162 | - 'muscatferret' => true, | |
| 163 | - 'mwdsearch' => true, | |
| 164 | - 'myweb' => true, | |
| 165 | - 'NDSpider' => true, | |
| 166 | - 'netcarta' => true, | |
| 167 | - 'netmechanic' => true, | |
| 168 | - 'netscoop' => true, | |
| 169 | - 'newscan-online' => true, | |
| 170 | - 'nhse' => true, | |
| 171 | - 'nomad' => true, | |
| 172 | - 'northstar' => true, | |
| 173 | - 'objectssearch' => true, | |
| 174 | - 'occam' => true, | |
| 175 | - 'octopus' => true, | |
| 176 | - 'OntoSpider' => true, | |
| 177 | - 'openfind' => true, | |
| 178 | - 'orb_search' => true, | |
| 179 | - 'packrat' => true, | |
| 180 | - 'pageboy' => true, | |
| 181 | - 'parasite' => true, | |
| 182 | - 'patric' => true, | |
| 183 | - 'pegasus' => true, | |
| 184 | - 'perignator' => true, | |
| 185 | - 'perlcrawler' => true, | |
| 186 | - 'phantom' => true, | |
| 187 | - 'phpdig' => true, | |
| 188 | - 'piltdownman' => true, | |
| 189 | - 'pimptrain' => true, | |
| 190 | - 'pioneer' => true, | |
| 191 | - 'pitkow' => true, | |
| 192 | - 'pjspider' => true, | |
| 193 | - 'pka' => true, | |
| 194 | - 'plumtreewebaccessor' => true, | |
| 195 | - 'poppi' => true, | |
| 196 | - 'portalb' => true, | |
| 197 | - 'psbot' => true, | |
| 198 | - 'Puu' => true, | |
| 199 | - 'python' => true, | |
| 200 | - 'raven' => true, | |
| 201 | - 'rbse' => true, | |
| 202 | - 'resumerobot' => true, | |
| 203 | - 'rhcs' => true, | |
| 204 | - 'rixbot' => true, | |
| 205 | - 'roadrunner' => true, | |
| 206 | - 'robbie' => true, | |
| 207 | - 'robi' => true, | |
| 208 | - 'robocrawl' => true, | |
| 209 | - 'robofox' => true, | |
| 210 | - 'robozilla' => true, | |
| 211 | - 'roverbot' => true, | |
| 212 | - 'rules' => true, | |
| 213 | - 'safetynetrobot' => true, | |
| 214 | - 'scooter' => true, | |
| 215 | - 'search_au' => true, | |
| 216 | - 'search-info' => true, | |
| 217 | - 'searchprocess' => true, | |
| 218 | - 'senrigan' => true, | |
| 219 | - 'sgscout' => true, | |
| 220 | - 'shaggy' => true, | |
| 221 | - 'shaihulud' => true, | |
| 222 | - 'sift' => true, | |
| 223 | - 'simbot' => true, | |
| 224 | - 'site-valet' => true, | |
| 225 | - 'sitetech' => true, | |
| 226 | - 'skymob' => true, | |
| 227 | - 'slcrawler' => true, | |
| 228 | - 'slurp' => true, | |
| 229 | - 'smartspider' => true, | |
| 230 | - 'snooper' => true, | |
| 231 | - 'solbot' => true, | |
| 232 | - 'speedy' => true, | |
| 233 | - 'spider_monkey' => true, | |
| 234 | - 'spiderbot' => true, | |
| 235 | - 'spiderline' => true, | |
| 236 | - 'spiderman' => true, | |
| 237 | - 'spiderview' => true, | |
| 238 | - 'spry' => true, | |
| 239 | - 'ssearcher' => true, | |
| 240 | - 'suke' => true, | |
| 241 | - 'suntek' => true, | |
| 242 | - 'sven' => true, | |
| 243 | - 'sygol' => true, | |
| 244 | - 'tach_bw' => true, | |
| 245 | - 'tarantula' => true, | |
| 246 | - 'tarspider' => true, | |
| 247 | - 'tcl' => true, | |
| 248 | - 'techbot' => true, | |
| 249 | - 'templeton' => true, | |
| 250 | - 'titin' => true, | |
| 251 | - 'titan' => true, | |
| 252 | - 'tkwww' => true, | |
| 253 | - 'tlspider' => true, | |
| 254 | - 'ucsd' => true, | |
| 255 | - 'udmsearch' => true, | |
| 256 | - 'uptimebot' => true, | |
| 257 | - 'urlck' => true, | |
| 258 | - 'us' => true, | |
| 259 | - 'valkyrie' => true, | |
| 260 | - 'verticrawl' => true, | |
| 261 | - 'victoria' => true, | |
| 262 | - 'visionsearch' => true, | |
| 263 | - 'voidbot' => true, | |
| 264 | - 'voyager' => true, | |
| 265 | - 'vwbot' => true, | |
| 266 | - 'w3index' => true, | |
| 267 | - 'w3m2' => true, | |
| 268 | - 'wallpaper' => true, | |
| 269 | - 'wanderer' => true, | |
| 270 | - 'wapspider' => true, | |
| 271 | - 'webbandit' => true, | |
| 272 | - 'webcatcher' => true, | |
| 273 | - 'webcopy' => true, | |
| 274 | - 'webfetcher' => true, | |
| 275 | - 'webfoot' => true, | |
| 276 | - 'webinator' => true, | |
| 277 | - 'weblayers' => true, | |
| 278 | - 'weblinker' => true, | |
| 279 | - 'webmirror' => true, | |
| 280 | - 'webmoose' => true, | |
| 281 | - 'webquest' => true, | |
| 282 | - 'webreader' => true, | |
| 283 | - 'webreaper' => true, | |
| 284 | - 'webs' => true, | |
| 285 | - 'websnarf' => true, | |
| 286 | - 'webspider' => true, | |
| 287 | - 'webvac' => true, | |
| 288 | - 'webwalk' => true, | |
| 289 | - 'webwalker' => true, | |
| 290 | - 'webwatch' => true, | |
| 291 | - 'wget' => true, | |
| 292 | - 'whatuseek' => true, | |
| 293 | - 'whowhere' => true, | |
| 294 | - 'wlm' => true, | |
| 295 | - 'wmir' => true, | |
| 296 | - 'wolp' => true, | |
| 297 | - 'wombat' => true, | |
| 298 | - 'worm' => true, | |
| 299 | - 'wwwc' => true, | |
| 300 | - 'wz101' => true, | |
| 301 | - 'xget' => true, | |
| 302 | - 'Nederland.zoek' => true, | |
| 303 | - 'nutch' => true | |
| 304 | - ); | |
| 305 | - | |
| 306 | - public function is_robot() { | |
| 307 | - $user_agent = $_SERVER['HTTP_USER_AGENT']; | |
| 308 | - | |
| 309 | - $common_browsers = 'Chrome|Firefox|MSIE|Safari|Opera'; | |
| 310 | - if ( preg_match( '/' . $common_browsers . '/i', $user_agent ) ) { | |
| 311 | - return false; | |
| 312 | - } | |
| 313 | - | |
| 314 | - $agent_name = preg_replace( '#^(.+?)/.*$#', '$1', $user_agent ); | |
| 315 | - | |
| 316 | - return ! empty( $this->robots[ $agent_name ] ); | |
| 317 | - } | |
| 318 | -} | |
| 1 | +<?php | |
| 2 | + | |
| 3 | +class RobotDetector { | |
| 4 | + private $robots = array( | |
| 5 | + 'abcdatos' => true, | |
| 6 | + 'acme-spider' => true, | |
| 7 | + 'ahoythehomepagefinder' => true, | |
| 8 | + 'Alkaline' => true, | |
| 9 | + 'anthill' => true, | |
| 10 | + 'appie' => true, | |
| 11 | + 'arachnophilia' => true, | |
| 12 | + 'arale' => true, | |
| 13 | + 'araneo' => true, | |
| 14 | + 'araybot' => true, | |
| 15 | + 'architext' => true, | |
| 16 | + 'aretha' => true, | |
| 17 | + 'ariadne' => true, | |
| 18 | + 'arks' => true, | |
| 19 | + 'aspider' => true, | |
| 20 | + 'atn' => true, | |
| 21 | + 'atomz' => true, | |
| 22 | + 'auresys' => true, | |
| 23 | + 'backrub' => true, | |
| 24 | + 'bayspider' => true, | |
| 25 | + 'bbot' => true, | |
| 26 | + 'bigbrother' => true, | |
| 27 | + 'bingbot' => true, | |
| 28 | + 'bjaaland' => true, | |
| 29 | + 'blackwidow' => true, | |
| 30 | + 'blindekuh' => true, | |
| 31 | + 'Bloodhound' => true, | |
| 32 | + 'borg-bot' => true, | |
| 33 | + 'boxseabot' => true, | |
| 34 | + 'brightnet' => true, | |
| 35 | + 'bspider' => true, | |
| 36 | + 'cactvschemistryspider' => true, | |
| 37 | + 'calif' => true, | |
| 38 | + 'curl' => true, | |
| 39 | + 'cassandra' => true, | |
| 40 | + 'cgireader' => true, | |
| 41 | + 'checkbot' => true, | |
| 42 | + 'christcrawler' => true, | |
| 43 | + 'churl' => true, | |
| 44 | + 'cienciaficcion' => true, | |
| 45 | + 'cmc' => true, | |
| 46 | + 'Collective' => true, | |
| 47 | + 'combine' => true, | |
| 48 | + 'confuzzledbot' => true, | |
| 49 | + 'coolbot' => true, | |
| 50 | + 'core' => true, | |
| 51 | + 'cosmos' => true, | |
| 52 | + 'cruiser' => true, | |
| 53 | + 'cusco' => true, | |
| 54 | + 'cyberspyder' => true, | |
| 55 | + 'cydralspider' => true, | |
| 56 | + 'desertrealm' => true, | |
| 57 | + 'deweb' => true, | |
| 58 | + 'dienstspider' => true, | |
| 59 | + 'digger' => true, | |
| 60 | + 'diibot' => true, | |
| 61 | + 'directhit' => true, | |
| 62 | + 'dnabot' => true, | |
| 63 | + 'download_express' => true, | |
| 64 | + 'dragonbot' => true, | |
| 65 | + 'dwcp' => true, | |
| 66 | + 'e-collector' => true, | |
| 67 | + 'ebiness' => true, | |
| 68 | + 'eit' => true, | |
| 69 | + 'elfinbot' => true, | |
| 70 | + 'emacs' => true, | |
| 71 | + 'emcspider' => true, | |
| 72 | + 'esculapio' => true, | |
| 73 | + 'esther' => true, | |
| 74 | + 'evliyacelebi' => true, | |
| 75 | + 'nzexplorer' => true, | |
| 76 | + 'fastcrawler' => true, | |
| 77 | + 'fdse' => true, | |
| 78 | + 'felix' => true, | |
| 79 | + 'ferret' => true, | |
| 80 | + 'fetchrover' => true, | |
| 81 | + 'fido' => true, | |
| 82 | + 'finnish' => true, | |
| 83 | + 'fireball' => true, | |
| 84 | + 'fish' => true, | |
| 85 | + 'fouineur' => true, | |
| 86 | + 'francoroute' => true, | |
| 87 | + 'freecrawl' => true, | |
| 88 | + 'funnelweb' => true, | |
| 89 | + 'gama' => true, | |
| 90 | + 'gazz' => true, | |
| 91 | + 'gcreep' => true, | |
| 92 | + 'getbot' => true, | |
| 93 | + 'geturl' => true, | |
| 94 | + 'golem' => true, | |
| 95 | + 'googlebot' => true, | |
| 96 | + 'grapnel' => true, | |
| 97 | + 'griffon' => true, | |
| 98 | + 'gromit' => true, | |
| 99 | + 'gulliver' => true, | |
| 100 | + 'gulperbot' => true, | |
| 101 | + 'hambot' => true, | |
| 102 | + 'harvest' => true, | |
| 103 | + 'havindex' => true, | |
| 104 | + 'hi' => true, | |
| 105 | + 'hometown' => true, | |
| 106 | + 'wired-digital' => true, | |
| 107 | + 'htdig' => true, | |
| 108 | + 'htmlgobble' => true, | |
| 109 | + 'hyperdecontextualizer' => true, | |
| 110 | + 'iajabot' => true, | |
| 111 | + 'ibm' => true, | |
| 112 | + 'iconoclast' => true, | |
| 113 | + 'Ilse' => true, | |
| 114 | + 'imagelock' => true, | |
| 115 | + 'incywincy' => true, | |
| 116 | + 'informant' => true, | |
| 117 | + 'infoseek' => true, | |
| 118 | + 'infoseeksidewinder' => true, | |
| 119 | + 'infospider' => true, | |
| 120 | + 'inspectorwww' => true, | |
| 121 | + 'intelliagent' => true, | |
| 122 | + 'irobot' => true, | |
| 123 | + 'iron33' => true, | |
| 124 | + 'israelisearch' => true, | |
| 125 | + 'javabee' => true, | |
| 126 | + 'JBot' => true, | |
| 127 | + 'jcrawler' => true, | |
| 128 | + 'askjeeves' => true, | |
| 129 | + 'jobo' => true, | |
| 130 | + 'jobot' => true, | |
| 131 | + 'joebot' => true, | |
| 132 | + 'jubii' => true, | |
| 133 | + 'jumpstation' => true, | |
| 134 | + 'kapsi' => true, | |
| 135 | + 'katipo' => true, | |
| 136 | + 'kdd' => true, | |
| 137 | + 'kilroy' => true, | |
| 138 | + 'ko_yappo_robot' => true, | |
| 139 | + 'larbin' => true, | |
| 140 | + 'legs' => true, | |
| 141 | + 'linkidator' => true, | |
| 142 | + 'linkscan' => true, | |
| 143 | + 'linkwalker' => true, | |
| 144 | + 'lockon' => true, | |
| 145 | + 'lycos' => true, | |
| 146 | + 'macworm' => true, | |
| 147 | + 'magpie' => true, | |
| 148 | + 'marvin' => true, | |
| 149 | + 'mattie' => true, | |
| 150 | + 'mediafox' => true, | |
| 151 | + 'merzscope' => true, | |
| 152 | + 'meshexplorer' => true, | |
| 153 | + 'MindCrawler' => true, | |
| 154 | + 'mnogosearch' => true, | |
| 155 | + 'moget' => true, | |
| 156 | + 'momspider' => true, | |
| 157 | + 'monster' => true, | |
| 158 | + 'motor' => true, | |
| 159 | + 'msnbot' => true, | |
| 160 | + 'muncher' => true, | |
| 161 | + 'muninn' => true, | |
| 162 | + 'muscatferret' => true, | |
| 163 | + 'mwdsearch' => true, | |
| 164 | + 'myweb' => true, | |
| 165 | + 'NDSpider' => true, | |
| 166 | + 'netcarta' => true, | |
| 167 | + 'netmechanic' => true, | |
| 168 | + 'netscoop' => true, | |
| 169 | + 'newscan-online' => true, | |
| 170 | + 'nhse' => true, | |
| 171 | + 'nomad' => true, | |
| 172 | + 'northstar' => true, | |
| 173 | + 'objectssearch' => true, | |
| 174 | + 'occam' => true, | |
| 175 | + 'octopus' => true, | |
| 176 | + 'OntoSpider' => true, | |
| 177 | + 'openfind' => true, | |
| 178 | + 'orb_search' => true, | |
| 179 | + 'packrat' => true, | |
| 180 | + 'pageboy' => true, | |
| 181 | + 'parasite' => true, | |
| 182 | + 'patric' => true, | |
| 183 | + 'pegasus' => true, | |
| 184 | + 'perignator' => true, | |
| 185 | + 'perlcrawler' => true, | |
| 186 | + 'phantom' => true, | |
| 187 | + 'phpdig' => true, | |
| 188 | + 'piltdownman' => true, | |
| 189 | + 'pimptrain' => true, | |
| 190 | + 'pioneer' => true, | |
| 191 | + 'pitkow' => true, | |
| 192 | + 'pjspider' => true, | |
| 193 | + 'pka' => true, | |
| 194 | + 'plumtreewebaccessor' => true, | |
| 195 | + 'poppi' => true, | |
| 196 | + 'portalb' => true, | |
| 197 | + 'psbot' => true, | |
| 198 | + 'Puu' => true, | |
| 199 | + 'python' => true, | |
| 200 | + 'raven' => true, | |
| 201 | + 'rbse' => true, | |
| 202 | + 'resumerobot' => true, | |
| 203 | + 'rhcs' => true, | |
| 204 | + 'rixbot' => true, | |
| 205 | + 'roadrunner' => true, | |
| 206 | + 'robbie' => true, | |
| 207 | + 'robi' => true, | |
| 208 | + 'robocrawl' => true, | |
| 209 | + 'robofox' => true, | |
| 210 | + 'robozilla' => true, | |
| 211 | + 'roverbot' => true, | |
| 212 | + 'rules' => true, | |
| 213 | + 'safetynetrobot' => true, | |
| 214 | + 'scooter' => true, | |
| 215 | + 'search_au' => true, | |
| 216 | + 'search-info' => true, | |
| 217 | + 'searchprocess' => true, | |
| 218 | + 'senrigan' => true, | |
| 219 | + 'sgscout' => true, | |
| 220 | + 'shaggy' => true, | |
| 221 | + 'shaihulud' => true, | |
| 222 | + 'sift' => true, | |
| 223 | + 'simbot' => true, | |
| 224 | + 'site-valet' => true, | |
| 225 | + 'sitetech' => true, | |
| 226 | + 'skymob' => true, | |
| 227 | + 'slcrawler' => true, | |
| 228 | + 'slurp' => true, | |
| 229 | + 'smartspider' => true, | |
| 230 | + 'snooper' => true, | |
| 231 | + 'solbot' => true, | |
| 232 | + 'speedy' => true, | |
| 233 | + 'spider_monkey' => true, | |
| 234 | + 'spiderbot' => true, | |
| 235 | + 'spiderline' => true, | |
| 236 | + 'spiderman' => true, | |
| 237 | + 'spiderview' => true, | |
| 238 | + 'spry' => true, | |
| 239 | + 'ssearcher' => true, | |
| 240 | + 'suke' => true, | |
| 241 | + 'suntek' => true, | |
| 242 | + 'sven' => true, | |
| 243 | + 'sygol' => true, | |
| 244 | + 'tach_bw' => true, | |
| 245 | + 'tarantula' => true, | |
| 246 | + 'tarspider' => true, | |
| 247 | + 'tcl' => true, | |
| 248 | + 'techbot' => true, | |
| 249 | + 'templeton' => true, | |
| 250 | + 'titin' => true, | |
| 251 | + 'titan' => true, | |
| 252 | + 'tkwww' => true, | |
| 253 | + 'tlspider' => true, | |
| 254 | + 'ucsd' => true, | |
| 255 | + 'udmsearch' => true, | |
| 256 | + 'uptimebot' => true, | |
| 257 | + 'urlck' => true, | |
| 258 | + 'us' => true, | |
| 259 | + 'valkyrie' => true, | |
| 260 | + 'verticrawl' => true, | |
| 261 | + 'victoria' => true, | |
| 262 | + 'visionsearch' => true, | |
| 263 | + 'voidbot' => true, | |
| 264 | + 'voyager' => true, | |
| 265 | + 'vwbot' => true, | |
| 266 | + 'w3index' => true, | |
| 267 | + 'w3m2' => true, | |
| 268 | + 'wallpaper' => true, | |
| 269 | + 'wanderer' => true, | |
| 270 | + 'wapspider' => true, | |
| 271 | + 'webbandit' => true, | |
| 272 | + 'webcatcher' => true, | |
| 273 | + 'webcopy' => true, | |
| 274 | + 'webfetcher' => true, | |
| 275 | + 'webfoot' => true, | |
| 276 | + 'webinator' => true, | |
| 277 | + 'weblayers' => true, | |
| 278 | + 'weblinker' => true, | |
| 279 | + 'webmirror' => true, | |
| 280 | + 'webmoose' => true, | |
| 281 | + 'webquest' => true, | |
| 282 | + 'webreader' => true, | |
| 283 | + 'webreaper' => true, | |
| 284 | + 'webs' => true, | |
| 285 | + 'websnarf' => true, | |
| 286 | + 'webspider' => true, | |
| 287 | + 'webvac' => true, | |
| 288 | + 'webwalk' => true, | |
| 289 | + 'webwalker' => true, | |
| 290 | + 'webwatch' => true, | |
| 291 | + 'wget' => true, | |
| 292 | + 'whatuseek' => true, | |
| 293 | + 'whowhere' => true, | |
| 294 | + 'wlm' => true, | |
| 295 | + 'wmir' => true, | |
| 296 | + 'wolp' => true, | |
| 297 | + 'wombat' => true, | |
| 298 | + 'worm' => true, | |
| 299 | + 'wwwc' => true, | |
| 300 | + 'wz101' => true, | |
| 301 | + 'xget' => true, | |
| 302 | + 'Nederland.zoek' => true, | |
| 303 | + 'nutch' => true | |
| 304 | + ); | |
| 305 | + | |
| 306 | + public function is_robot() { | |
| 307 | + $user_agent = $_SERVER['HTTP_USER_AGENT']; | |
| 308 | + | |
| 309 | + $common_browsers = 'Chrome|Firefox|MSIE|Safari|Opera'; | |
| 310 | + if ( preg_match( '/' . $common_browsers . '/i', $user_agent ) ) { | |
| 311 | + return false; | |
| 312 | + } | |
| 313 | + | |
| 314 | + $agent_name = preg_replace( '#^(.+?)/.*$#', '$1', $user_agent ); | |
| 315 | + | |
| 316 | + return ! empty( $this->robots[ $agent_name ] ); | |
| 317 | + } | |
| 318 | +} | |