blob: 68d78536510ac87ba7344375d027cb6fbaff2858 [file] [log] [blame]
darwineld8bef8a2014-02-11 20:13:22 +01001<?php
darwineld8bef8a2014-02-11 20:13:22 +01002defined('BASEPATH') OR exit('No direct script access allowed');
Derek Jonesf4a4bd82011-10-20 12:18:42 -05003
Derek Allard2067d1a2008-11-13 22:59:24 +00004/*
5| -------------------------------------------------------------------
6| USER AGENT TYPES
7| -------------------------------------------------------------------
Andrey Andreevd4901392012-06-06 14:54:15 +03008| This file contains four arrays of user agent data. It is used by the
Derek Allard2067d1a2008-11-13 22:59:24 +00009| User Agent Class to help identify browser, platform, robot, and
Andrey Andreevd4901392012-06-06 14:54:15 +030010| mobile device data. The array keys are used to identify the device
Derek Allard2067d1a2008-11-13 22:59:24 +000011| and the array values are used to set the actual name of the item.
Derek Allard2067d1a2008-11-13 22:59:24 +000012*/
13
Andrey Andreevca7d8222012-05-11 10:59:09 +030014$platforms = array(
Andre Gardiner303c7b22013-12-05 22:00:32 -050015 'windows nt 6.3' => 'Windows 8.1',
Debeet9defe902012-07-25 17:32:11 +030016 'windows nt 6.2' => 'Windows 8',
Eric Barnes46fcf0b2011-11-12 12:42:14 -050017 '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',
msegers335fed92013-08-14 10:46:25 +020030 'windows phone' => 'Windows Phone',
Eric Barnes46fcf0b2011-11-12 12:42:14 -050031 'windows' => 'Unknown Windows OS',
Andrey Andreevca7d8222012-05-11 10:59:09 +030032 'android' => 'Android',
33 'blackberry' => 'BlackBerry',
34 'iphone' => 'iOS',
35 'ipad' => 'iOS',
36 'ipod' => 'iOS',
Eric Barnes46fcf0b2011-11-12 12:42:14 -050037 '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 Rosa1799cbf2014-05-07 22:37:03 -030054 'unix' => 'Unknown Unix OS',
55 'symbian' => 'Symbian OS'
Eric Barnes46fcf0b2011-11-12 12:42:14 -050056);
Derek Allard2067d1a2008-11-13 22:59:24 +000057
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(
Jcchemin02410502013-10-08 18:18:54 +020062 'OPR' => 'Opera',
Eric Barnes46fcf0b2011-11-12 12:42:14 -050063 'Flock' => 'Flock',
64 'Chrome' => 'Chrome',
Andrey Andreev10925d22014-01-09 00:16:46 +020065 // Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string
66 'Opera.*?Version' => 'Opera',
Eric Barnes46fcf0b2011-11-12 12:42:14 -050067 'Opera' => 'Opera',
68 'MSIE' => 'Internet Explorer',
69 'Internet Explorer' => 'Internet Explorer',
Dionysis Arvanitis2cdd50e2014-01-15 16:24:15 +020070 'Trident.* rv' => 'Internet Explorer',
Eric Barnes46fcf0b2011-11-12 12:42:14 -050071 'Shiira' => 'Shiira',
72 'Firefox' => 'Firefox',
73 'Chimera' => 'Chimera',
74 'Phoenix' => 'Phoenix',
75 'Firebird' => 'Firebird',
76 'Camino' => 'Camino',
77 'Netscape' => 'Netscape',
78 'OmniWeb' => 'OmniWeb',
79 'Safari' => 'Safari',
80 'Mozilla' => 'Mozilla',
81 'Konqueror' => 'Konqueror',
82 'icab' => 'iCab',
83 'Lynx' => 'Lynx',
84 'Links' => 'Links',
85 'hotjava' => 'HotJava',
86 'amaya' => 'Amaya',
Andrey Andreev3ffce982013-01-21 15:24:09 +020087 'IBrowse' => 'IBrowse',
vkeranovfdd14612013-11-08 09:19:29 +020088 'Maxthon' => 'Maxthon',
89 'Ubuntu' => 'Ubuntu Web Browser'
Eric Barnes46fcf0b2011-11-12 12:42:14 -050090);
Derek Allard2067d1a2008-11-13 22:59:24 +000091
92$mobiles = array(
Eric Barnes46fcf0b2011-11-12 12:42:14 -050093 // legacy array, old values commented out
94 'mobileexplorer' => 'Mobile Explorer',
95// 'openwave' => 'Open Wave',
96// 'opera mini' => 'Opera Mini',
97// 'operamini' => 'Opera Mini',
98// 'elaine' => 'Palm',
99 'palmsource' => 'Palm',
100// 'digital paths' => 'Palm',
101// 'avantgo' => 'Avantgo',
102// 'xiino' => 'Xiino',
103 'palmscape' => 'Palmscape',
104// 'nokia' => 'Nokia',
105// 'ericsson' => 'Ericsson',
106// 'blackberry' => 'BlackBerry',
107// 'motorola' => 'Motorola'
Derek Allard2067d1a2008-11-13 22:59:24 +0000108
Eric Barnes46fcf0b2011-11-12 12:42:14 -0500109 // Phones and Manufacturers
Andrey Andreevca7d8222012-05-11 10:59:09 +0300110 'motorola' => 'Motorola',
111 'nokia' => 'Nokia',
112 'palm' => 'Palm',
113 'iphone' => 'Apple iPhone',
114 'ipad' => 'iPad',
115 'ipod' => 'Apple iPod Touch',
116 'sony' => 'Sony Ericsson',
117 'ericsson' => 'Sony Ericsson',
118 'blackberry' => 'BlackBerry',
119 'cocoon' => 'O2 Cocoon',
120 'blazer' => 'Treo',
121 'lg' => 'LG',
122 'amoi' => 'Amoi',
123 'xda' => 'XDA',
124 'mda' => 'MDA',
125 'vario' => 'Vario',
126 'htc' => 'HTC',
127 'samsung' => 'Samsung',
128 'sharp' => 'Sharp',
129 'sie-' => 'Siemens',
130 'alcatel' => 'Alcatel',
131 'benq' => 'BenQ',
132 'ipaq' => 'HP iPaq',
133 'mot-' => 'Motorola',
134 'playstation portable' => 'PlayStation Portable',
Debeet9defe902012-07-25 17:32:11 +0300135 'playstation 3' => 'PlayStation 3',
TheDragonSlayer2e746812013-03-30 09:50:27 -0300136 'playstation vita' => 'PlayStation Vita',
Andrey Andreevca7d8222012-05-11 10:59:09 +0300137 'hiptop' => 'Danger Hiptop',
138 'nec-' => 'NEC',
139 'panasonic' => 'Panasonic',
140 'philips' => 'Philips',
141 'sagem' => 'Sagem',
142 'sanyo' => 'Sanyo',
143 'spv' => 'SPV',
144 'zte' => 'ZTE',
145 'sendo' => 'Sendo',
Eric Roberts19d0f562012-08-11 19:53:59 -0500146 'nintendo dsi' => 'Nintendo DSi',
147 'nintendo ds' => 'Nintendo DS',
148 'nintendo 3ds' => 'Nintendo 3DS',
Andrey Andreevca7d8222012-05-11 10:59:09 +0300149 'wii' => 'Nintendo Wii',
Andrey Andreevca7d8222012-05-11 10:59:09 +0300150 'open web' => 'Open Web',
151 'openweb' => 'OpenWeb',
Bo-Yi Wuf22f8522011-11-12 15:23:04 +0800152
Eric Barnes46fcf0b2011-11-12 12:42:14 -0500153 // Operating Systems
Andrey Andreevca7d8222012-05-11 10:59:09 +0300154 'android' => 'Android',
155 'symbian' => 'Symbian',
156 'SymbianOS' => 'SymbianOS',
157 'elaine' => 'Palm',
Andrey Andreevca7d8222012-05-11 10:59:09 +0300158 'series60' => 'Symbian S60',
159 'windows ce' => 'Windows CE',
Derek Allard2067d1a2008-11-13 22:59:24 +0000160
Eric Barnes46fcf0b2011-11-12 12:42:14 -0500161 // Browsers
Andrey Andreevca7d8222012-05-11 10:59:09 +0300162 'obigo' => 'Obigo',
163 'netfront' => 'Netfront Browser',
164 'openwave' => 'Openwave Browser',
165 'mobilexplorer' => 'Mobile Explorer',
166 'operamini' => 'Opera Mini',
167 'opera mini' => 'Opera Mini',
168 'opera mobi' => 'Opera Mobile',
vlakoffc941d852013-08-06 14:44:40 +0200169 'fennec' => 'Firefox Mobile',
Derek Allard2067d1a2008-11-13 22:59:24 +0000170
Eric Barnes46fcf0b2011-11-12 12:42:14 -0500171 // Other
Andrey Andreevca7d8222012-05-11 10:59:09 +0300172 'digital paths' => 'Digital Paths',
173 'avantgo' => 'AvantGo',
174 'xiino' => 'Xiino',
175 'novarra' => 'Novarra Transcoder',
176 'vodafone' => 'Vodafone',
177 'docomo' => 'NTT DoCoMo',
178 'o2' => 'O2',
Derek Allard2067d1a2008-11-13 22:59:24 +0000179
Eric Barnes46fcf0b2011-11-12 12:42:14 -0500180 // Fallback
Andrey Andreevca7d8222012-05-11 10:59:09 +0300181 'mobile' => 'Generic Mobile',
182 'wireless' => 'Generic Mobile',
183 'j2me' => 'Generic Mobile',
184 'midp' => 'Generic Mobile',
185 'cldc' => 'Generic Mobile',
186 'up.link' => 'Generic Mobile',
187 'up.browser' => 'Generic Mobile',
188 'smartphone' => 'Generic Mobile',
189 'cellphone' => 'Generic Mobile'
Eric Barnes46fcf0b2011-11-12 12:42:14 -0500190);
Derek Allard2067d1a2008-11-13 22:59:24 +0000191
192// There are hundreds of bots but these are the most common.
193$robots = array(
Eric Barnes46fcf0b2011-11-12 12:42:14 -0500194 'googlebot' => 'Googlebot',
195 'msnbot' => 'MSNBot',
Jacques du Randcae7a402014-11-23 18:37:54 +0200196 'baiduspider' => 'Baiduspider',
Andrew Seymour00cfbd22011-11-12 21:18:07 +0000197 'bingbot' => 'Bing',
Eric Barnes46fcf0b2011-11-12 12:42:14 -0500198 'slurp' => 'Inktomi Slurp',
199 'yahoo' => 'Yahoo',
200 'askjeeves' => 'AskJeeves',
Jacques du Rand05033362014-11-23 18:34:20 +0200201 'fastcrawler' => 'FastCrawler',
Eric Barnes46fcf0b2011-11-12 12:42:14 -0500202 'infoseek' => 'InfoSeek Robot 1.0',
Garth Kerr1bfc1152013-04-03 13:02:21 -0400203 'lycos' => 'Lycos',
Jacques du Rand538d5342014-11-23 11:35:22 +0200204 'yandex' => 'YandexBot',
Jacques du Rand70ba13a2014-11-23 09:18:03 +0200205 'mediapartners-google' => 'MediaPartners Google',
206 'CRAZYWEBCRAWLER' => 'Crazy Webcrawler',
207 'adsbot-google' => 'AdsBot Google',
208 'feedfetcher-google' => 'Feedfetcher Google',
Jacques du Rand538d5342014-11-23 11:35:22 +0200209 'curious george' => 'Curious George'
Eric Barnes46fcf0b2011-11-12 12:42:14 -0500210);