Advertisement
Guest User

CodeIgniter - User Agent Configuration File

a guest
Jun 7th, 2011
1,560
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.98 KB | None | 0 0
  1. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2. /*
  3. | -------------------------------------------------------------------
  4. | USER AGENT TYPES
  5. | -------------------------------------------------------------------
  6. | This file contains four arrays of user agent data. It is used by the
  7. | User Agent Class to help identify browser, platform, robot, and
  8. | mobile device data. The array keys are used to identify the device
  9. | and the array values are used to set the actual name of the item.
  10. |
  11. */
  12.  
  13. $platforms = array (
  14.                     'windows nt 6.1'    => 'Windows 7',
  15.                     'windows nt 6.0'    => 'Windows Longhorn',
  16.                     'windows nt 5.2'    => 'Windows 2003',
  17.                     'windows nt 5.0'    => 'Windows 2000',
  18.                     'windows nt 5.1'    => 'Windows XP',
  19.                     'windows nt 4.0'    => 'Windows NT 4.0',
  20.                     'winnt4.0'          => 'Windows NT 4.0',
  21.                     'winnt 4.0'         => 'Windows NT',
  22.                     'winnt'             => 'Windows NT',
  23.                     'windows 98'        => 'Windows 98',
  24.                     'win98'             => 'Windows 98',
  25.                     'windows 95'        => 'Windows 95',
  26.                     'win95'             => 'Windows 95',
  27.                     'windows'           => 'Unknown Windows OS',
  28.                     'os x'              => 'Mac OS X',
  29.                     'playstation 3'     => 'Playstation 3',
  30.                     'nintendo wii'      => 'Nintendo Wii',
  31.                     'ppc mac'           => 'Power PC Mac',
  32.                     'freebsd'           => 'FreeBSD',
  33.                     'ppc'               => 'Macintosh',
  34.                     'ubuntu'            => 'Ubuntu',
  35.                     'linux'             => 'Linux',
  36.                     'debian'            => 'Debian',
  37.                     'sunos'             => 'Sun Solaris',
  38.                     'beos'              => 'BeOS',
  39.                     'apachebench'       => 'ApacheBench',
  40.                     'aix'               => 'AIX',
  41.                     'irix'              => 'Irix',
  42.                     'osf'               => 'DEC OSF',
  43.                     'hp-ux'             => 'HP-UX',
  44.                     'netbsd'            => 'NetBSD',
  45.                     'bsdi'              => 'BSDi',
  46.                     'openbsd'           => 'OpenBSD',
  47.                     'gnu'               => 'GNU/Linux',
  48.                     'unix'              => 'Unknown Unix OS'
  49.                 );
  50.  
  51.  
  52. // The order of this array should NOT be changed. Many browsers return
  53. // multiple browser types so we want to identify the sub-type first.
  54. $browsers = array(
  55.                     'Flock'             => 'Flock',
  56.                     'RockMelt'          => 'RockMelt',
  57.                     'Chrome'            => 'Chrome',
  58.                     'Opera'             => 'Opera',
  59.                     'MSIE'              => 'Internet Explorer',
  60.                     'Internet Explorer' => 'Internet Explorer',
  61.                     'Shiira'            => 'Shiira',
  62.                     'Firefox'           => 'Firefox',
  63.                     'Chimera'           => 'Chimera',
  64.                     'Phoenix'           => 'Phoenix',
  65.                     'Firebird'          => 'Firebird',
  66.                     'Camino'            => 'Camino',
  67.                     'Netscape'          => 'Netscape',
  68.                     'OmniWeb'           => 'OmniWeb',
  69.                     'Safari'            => 'Safari',
  70.                     'Mozilla'           => 'Mozilla',
  71.                     'Konqueror'         => 'Konqueror',
  72.                     'icab'              => 'iCab',
  73.                     'Lynx'              => 'Lynx',
  74.                     'Links'             => 'Links',
  75.                     'hotjava'           => 'HotJava',
  76.                     'amaya'             => 'Amaya',
  77.                     'IBrowse'           => 'IBrowse'
  78.                 );
  79.  
  80. $mobiles = array(
  81.                     // legacy array, old values commented out
  82.                     'mobileexplorer'    => 'Mobile Explorer',
  83. //                  'openwave'          => 'Open Wave',
  84. //                  'opera mini'        => 'Opera Mini',
  85. //                  'operamini'         => 'Opera Mini',
  86. //                  'elaine'            => 'Palm',
  87.                     'palmsource'        => 'Palm',
  88. //                  'digital paths'     => 'Palm',
  89. //                  'avantgo'           => 'Avantgo',
  90. //                  'xiino'             => 'Xiino',
  91.                     'palmscape'         => 'Palmscape',
  92. //                  'nokia'             => 'Nokia',
  93. //                  'ericsson'          => 'Ericsson',
  94. //                  'blackberry'        => 'BlackBerry',
  95. //                  'motorola'          => 'Motorola'
  96.  
  97.                     // Phones and Manufacturers
  98.                     'motorola'          => "Motorola",
  99.                     'nokia'             => "Nokia",
  100.                     'palm'              => "Palm",
  101.                     'ipod'              => "Apple iPod Touch",
  102.                     'iphone'            => "Apple iPhone",
  103.                     'ipad'              => "iPad",
  104.                     'kindle'            => "Amazon Kindle",
  105.                     'android'           => "Android",
  106.                     'windows'           => "Windows Phone",
  107.                     'sony'              => "Sony Ericsson",
  108.                     'ericsson'          => "Sony Ericsson",
  109.                     'blackberry'        => "BlackBerry",
  110.                     'cocoon'            => "O2 Cocoon",
  111.                     'blazer'            => "Treo",
  112.                     'lg'                => "LG",
  113.                     'amoi'              => "Amoi",
  114.                     'xda'               => "XDA",
  115.                     'mda'               => "MDA",
  116.                     'vario'             => "Vario",
  117.                     'htc'               => "HTC",
  118.                     'samsung'           => "Samsung",
  119.                     'sharp'             => "Sharp",
  120.                     'sie-'              => "Siemens",
  121.                     'alcatel'           => "Alcatel",
  122.                     'benq'              => "BenQ",
  123.                     'ipaq'              => "HP iPaq",
  124.                     'mot-'              => "Motorola",
  125.                     'playstation portable'  => "PlayStation Portable",
  126.                     'hiptop'            => "Danger Hiptop",
  127.                     'nec-'              => "NEC",
  128.                     'panasonic'         => "Panasonic",
  129.                     'philips'           => "Philips",
  130.                     'sagem'             => "Sagem",
  131.                     'sanyo'             => "Sanyo",
  132.                     'spv'               => "SPV",
  133.                     'zte'               => "ZTE",
  134.                     'sendo'             => "Sendo",
  135.  
  136.                     // Operating Systems
  137.                     'symbian'               => "Symbian",
  138.                     'SymbianOS'             => "SymbianOS",
  139.                     'elaine'                => "Palm",
  140.                     'palm'                  => "Palm",
  141.                     'series60'              => "Symbian S60",
  142.                     'windows ce'            => "Windows CE",
  143.  
  144.                     // Browsers
  145.                     'fennec'                => "Firefox Mobile",
  146.                     'minimo'                => "Minimo",
  147.                     'obigo'                 => "Obigo",
  148.                     'netfront'              => "Netfront Browser",
  149.                     'openwave'              => "Openwave Browser",
  150.                     'mobilexplorer'         => "Mobile Explorer",
  151.                     'operamini'             => "Opera Mini",
  152.                     'opera mini'            => "Opera Mini",
  153.  
  154.                     // Other
  155.                     'digital paths'         => "Digital Paths",
  156.                     'avantgo'               => "AvantGo",
  157.                     'xiino'                 => "Xiino",
  158.                     'novarra'               => "Novarra Transcoder",
  159.                     'vodafone'              => "Vodafone",
  160.                     'docomo'                => "NTT DoCoMo",
  161.                     'o2'                    => "O2",
  162.  
  163.                     // Fallback
  164.                     'mobile'                => "Generic Mobile",
  165.                     'wireless'              => "Generic Mobile",
  166.                     'j2me'                  => "Generic Mobile",
  167.                     'midp'                  => "Generic Mobile",
  168.                     'cldc'                  => "Generic Mobile",
  169.                     'up.link'               => "Generic Mobile",
  170.                     'up.browser'            => "Generic Mobile",
  171.                     'smartphone'            => "Generic Mobile",
  172.                     'cellphone'             => "Generic Mobile"
  173.                 );
  174.  
  175. // There are hundreds of bots but these are the most common.
  176. $robots = array(
  177.                     'googlebot'         => 'Googlebot',
  178.                     'msnbot'            => 'MSNBot',
  179.                     'slurp'             => 'Inktomi Slurp',
  180.                     'yahoo'             => 'Yahoo',
  181.                     'askjeeves'         => 'AskJeeves',
  182.                     'fastcrawler'       => 'FastCrawler',
  183.                     'infoseek'          => 'InfoSeek Robot 1.0',
  184.                     'lycos'             => 'Lycos'
  185.                 );
  186.  
  187. /* End of file user_agents.php */
  188. /* Location: ./application/config/user_agents.php */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement