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