user_agents.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3. /*
  4. | -------------------------------------------------------------------
  5. | USER AGENT TYPES
  6. | -------------------------------------------------------------------
  7. | This file contains four arrays of user agent data. It is used by the
  8. | User Agent Class to help identify browser, platform, robot, and
  9. | mobile device data. The array keys are used to identify the device
  10. | and the array values are used to set the actual name of the item.
  11. */
  12. $platforms = array(
  13. 'windows nt 10.0' => 'Windows 10',
  14. 'windows nt 6.3' => 'Windows 8.1',
  15. 'windows nt 6.2' => 'Windows 8',
  16. 'windows nt 6.1' => 'Windows 7',
  17. 'windows nt 6.0' => 'Windows Vista',
  18. 'windows nt 5.2' => 'Windows 2003',
  19. 'windows nt 5.1' => 'Windows XP',
  20. 'windows nt 5.0' => 'Windows 2000',
  21. 'windows nt 4.0' => 'Windows NT 4.0',
  22. 'winnt4.0' => 'Windows NT 4.0',
  23. 'winnt 4.0' => 'Windows NT',
  24. 'winnt' => 'Windows NT',
  25. 'windows 98' => 'Windows 98',
  26. 'win98' => 'Windows 98',
  27. 'windows 95' => 'Windows 95',
  28. 'win95' => 'Windows 95',
  29. 'windows phone' => 'Windows Phone',
  30. 'windows' => 'Unknown Windows OS',
  31. 'android' => 'Android',
  32. 'blackberry' => 'BlackBerry',
  33. 'iphone' => 'iOS',
  34. 'ipad' => 'iOS',
  35. 'ipod' => 'iOS',
  36. 'os x' => 'Mac OS X',
  37. 'ppc mac' => 'Power PC Mac',
  38. 'freebsd' => 'FreeBSD',
  39. 'ppc' => 'Macintosh',
  40. 'linux' => 'Linux',
  41. 'debian' => 'Debian',
  42. 'sunos' => 'Sun Solaris',
  43. 'beos' => 'BeOS',
  44. 'apachebench' => 'ApacheBench',
  45. 'aix' => 'AIX',
  46. 'irix' => 'Irix',
  47. 'osf' => 'DEC OSF',
  48. 'hp-ux' => 'HP-UX',
  49. 'netbsd' => 'NetBSD',
  50. 'bsdi' => 'BSDi',
  51. 'openbsd' => 'OpenBSD',
  52. 'gnu' => 'GNU/Linux',
  53. 'unix' => 'Unknown Unix OS',
  54. 'symbian' => 'Symbian OS'
  55. );
  56. // The order of this array should NOT be changed. Many browsers return
  57. // multiple browser types so we want to identify the sub-type first.
  58. $browsers = array(
  59. 'OPR' => 'Opera',
  60. 'Flock' => 'Flock',
  61. 'Edge' => 'Edge',
  62. 'Chrome' => 'Chrome',
  63. // Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string
  64. 'Opera.*?Version' => 'Opera',
  65. 'Opera' => 'Opera',
  66. 'MSIE' => 'Internet Explorer',
  67. 'Internet Explorer' => 'Internet Explorer',
  68. 'Trident.* rv' => 'Internet Explorer',
  69. 'Shiira' => 'Shiira',
  70. 'Firefox' => 'Firefox',
  71. 'Chimera' => 'Chimera',
  72. 'Phoenix' => 'Phoenix',
  73. 'Firebird' => 'Firebird',
  74. 'Camino' => 'Camino',
  75. 'Netscape' => 'Netscape',
  76. 'OmniWeb' => 'OmniWeb',
  77. 'Safari' => 'Safari',
  78. 'Mozilla' => 'Mozilla',
  79. 'Konqueror' => 'Konqueror',
  80. 'icab' => 'iCab',
  81. 'Lynx' => 'Lynx',
  82. 'Links' => 'Links',
  83. 'hotjava' => 'HotJava',
  84. 'amaya' => 'Amaya',
  85. 'IBrowse' => 'IBrowse',
  86. 'Maxthon' => 'Maxthon',
  87. 'Ubuntu' => 'Ubuntu Web Browser'
  88. );
  89. $mobiles = array(
  90. // legacy array, old values commented out
  91. 'mobileexplorer' => 'Mobile Explorer',
  92. // 'openwave' => 'Open Wave',
  93. // 'opera mini' => 'Opera Mini',
  94. // 'operamini' => 'Opera Mini',
  95. // 'elaine' => 'Palm',
  96. 'palmsource' => 'Palm',
  97. // 'digital paths' => 'Palm',
  98. // 'avantgo' => 'Avantgo',
  99. // 'xiino' => 'Xiino',
  100. 'palmscape' => 'Palmscape',
  101. // 'nokia' => 'Nokia',
  102. // 'ericsson' => 'Ericsson',
  103. // 'blackberry' => 'BlackBerry',
  104. // 'motorola' => 'Motorola'
  105. // Phones and Manufacturers
  106. 'motorola' => 'Motorola',
  107. 'nokia' => 'Nokia',
  108. 'nexus' => 'Nexus',
  109. 'palm' => 'Palm',
  110. 'iphone' => 'Apple iPhone',
  111. 'ipad' => 'iPad',
  112. 'ipod' => 'Apple iPod Touch',
  113. 'sony' => 'Sony Ericsson',
  114. 'ericsson' => 'Sony Ericsson',
  115. 'blackberry' => 'BlackBerry',
  116. 'cocoon' => 'O2 Cocoon',
  117. 'blazer' => 'Treo',
  118. 'lg' => 'LG',
  119. 'amoi' => 'Amoi',
  120. 'xda' => 'XDA',
  121. 'mda' => 'MDA',
  122. 'vario' => 'Vario',
  123. 'htc' => 'HTC',
  124. 'samsung' => 'Samsung',
  125. 'sharp' => 'Sharp',
  126. 'sie-' => 'Siemens',
  127. 'alcatel' => 'Alcatel',
  128. 'benq' => 'BenQ',
  129. 'ipaq' => 'HP iPaq',
  130. 'mot-' => 'Motorola',
  131. 'playstation portable' => 'PlayStation Portable',
  132. 'playstation 3' => 'PlayStation 3',
  133. 'playstation vita' => 'PlayStation Vita',
  134. 'hiptop' => 'Danger Hiptop',
  135. 'nec-' => 'NEC',
  136. 'panasonic' => 'Panasonic',
  137. 'philips' => 'Philips',
  138. 'sagem' => 'Sagem',
  139. 'sanyo' => 'Sanyo',
  140. 'spv' => 'SPV',
  141. 'zte' => 'ZTE',
  142. 'sendo' => 'Sendo',
  143. 'nintendo dsi' => 'Nintendo DSi',
  144. 'nintendo ds' => 'Nintendo DS',
  145. 'nintendo 3ds' => 'Nintendo 3DS',
  146. 'wii' => 'Nintendo Wii',
  147. 'open web' => 'Open Web',
  148. 'openweb' => 'OpenWeb',
  149. 'meizu' => 'Meizu',
  150. // Operating Systems
  151. 'android' => 'Android',
  152. 'symbian' => 'Symbian',
  153. 'SymbianOS' => 'SymbianOS',
  154. 'elaine' => 'Palm',
  155. 'series60' => 'Symbian S60',
  156. 'windows ce' => 'Windows CE',
  157. // Browsers
  158. 'obigo' => 'Obigo',
  159. 'netfront' => 'Netfront Browser',
  160. 'openwave' => 'Openwave Browser',
  161. 'mobilexplorer' => 'Mobile Explorer',
  162. 'operamini' => 'Opera Mini',
  163. 'opera mini' => 'Opera Mini',
  164. 'opera mobi' => 'Opera Mobile',
  165. 'fennec' => 'Firefox Mobile',
  166. // Other
  167. 'digital paths' => 'Digital Paths',
  168. 'avantgo' => 'AvantGo',
  169. 'xiino' => 'Xiino',
  170. 'novarra' => 'Novarra Transcoder',
  171. 'vodafone' => 'Vodafone',
  172. 'docomo' => 'NTT DoCoMo',
  173. 'o2' => 'O2',
  174. // Fallback
  175. 'mobile' => 'Generic Mobile',
  176. 'wireless' => 'Generic Mobile',
  177. 'j2me' => 'Generic Mobile',
  178. 'midp' => 'Generic Mobile',
  179. 'cldc' => 'Generic Mobile',
  180. 'up.link' => 'Generic Mobile',
  181. 'up.browser' => 'Generic Mobile',
  182. 'smartphone' => 'Generic Mobile',
  183. 'cellphone' => 'Generic Mobile'
  184. );
  185. // There are hundreds of bots but these are the most common.
  186. $robots = array(
  187. 'googlebot' => 'Googlebot',
  188. 'msnbot' => 'MSNBot',
  189. 'baiduspider' => 'Baiduspider',
  190. 'bingbot' => 'Bing',
  191. 'slurp' => 'Inktomi Slurp',
  192. 'yahoo' => 'Yahoo',
  193. 'ask jeeves' => 'Ask Jeeves',
  194. 'fastcrawler' => 'FastCrawler',
  195. 'infoseek' => 'InfoSeek Robot 1.0',
  196. 'lycos' => 'Lycos',
  197. 'yandex' => 'YandexBot',
  198. 'mediapartners-google' => 'MediaPartners Google',
  199. 'CRAZYWEBCRAWLER' => 'Crazy Webcrawler',
  200. 'adsbot-google' => 'AdsBot Google',
  201. 'feedfetcher-google' => 'Feedfetcher Google',
  202. 'curious george' => 'Curious George',
  203. 'ia_archiver' => 'Alexa Crawler',
  204. 'MJ12bot' => 'Majestic-12',
  205. 'Uptimebot' => 'Uptimebot'
  206. );