RobotDetector

The Mailchimp Forms by Optin Cat RobotDetector class.

Defined (1)

The class is defined in the following location(s).

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