Advertisement
www-php-jquery-ir

تشخیص براوزر با پی اچ پی

Dec 12th, 2012
549
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 39.70 KB | None | 0 0
  1. <?php
  2.     //  pasted for: http://www.php-jquery.ir/4376
  3.     /**
  4.      * File: Browser.php
  5.      * Author: Chris Schuld (http://chrisschuld.com/)
  6.      * Last Modified: August 20th, 2010
  7.      * @version 1.9
  8.      * @package PegasusPHP
  9.      *
  10.      * Copyright (C) 2008-2010 Chris Schuld  (chris@chrisschuld.com)
  11.      *
  12.      * This program is free software; you can redistribute it and/or
  13.      * modify it under the terms of the GNU General Public License as
  14.      * published by the Free Software Foundation; either version 2 of
  15.      * the License, or (at your option) any later version.
  16.      *
  17.      * This program is distributed in the hope that it will be useful,
  18.      * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19.      * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20.      * GNU General Public License for more details at:
  21.      * http://www.gnu.org/copyleft/gpl.html
  22.      *
  23.      *
  24.      * Typical Usage:
  25.      *
  26.      *   $browser = new Browser();
  27.      *   if( $browser->getBrowser() == Browser::BROWSER_FIREFOX && $browser->getVersion() >= 2 ) {
  28.      *      echo 'You have FireFox version 2 or greater';
  29.      *   }
  30.      *
  31.      * User Agents Sampled from: http://www.useragentstring.com/
  32.      *
  33.      * This implementation is based on the original work from Gary White
  34.      * http://apptools.com/phptools/browser/
  35.      *
  36.      * UPDATES:
  37.      *
  38.      * 2010-08-20 (v1.9):
  39.      *  + Added MSN Explorer Browser (legacy)
  40.      *  + Added Bing/MSN Robot (Thanks Rob MacDonald)
  41.      *  + Added the Android Platform (PLATFORM_ANDROID)
  42.      *  + Fixed issue with Android 1.6/2.2 (Thanks Tom Hirashima)
  43.      *
  44.      * 2010-04-27 (v1.8):
  45.      *  + Added iPad Support
  46.      *
  47.      * 2010-03-07 (v1.7):
  48.      *  + *MAJOR* Rebuild (preg_match and other "slow" routine removal(s))
  49.      *  + Almost allof Gary's original code has been replaced
  50.      *  + Large PHPUNIT testing environment created to validate new releases and additions
  51.      *  + Added FreeBSD Platform
  52.      *  + Added OpenBSD Platform
  53.      *  + Added NetBSD Platform
  54.      *  + Added SunOS Platform
  55.      *  + Added OpenSolaris Platform
  56.      *  + Added support of the Iceweazel Browser
  57.      *  + Added isChromeFrame() call to check if chromeframe is in use
  58.      *  + Moved the Opera check in front of the Firefox check due to legacy Opera User Agents
  59.      *  + Added the __toString() method (Thanks Deano)
  60.      *
  61.      * 2009-11-15:
  62.      *  + Updated the checkes for Firefox
  63.      *  + Added the NOKIA platform
  64.      *  + Added Checks for the NOKIA brower(s)
  65.      *  
  66.      * 2009-11-08:
  67.      *  + PHP 5.3 Support
  68.      *  + Added support for BlackBerry OS and BlackBerry browser
  69.      *  + Added support for the Opera Mini browser
  70.      *  + Added additional documenation
  71.      *  + Added support for isRobot() and isMobile()
  72.      *  + Added support for Opera version 10
  73.      *  + Added support for deprecated Netscape Navigator version 9
  74.      *  + Added support for IceCat
  75.      *  + Added support for Shiretoko
  76.      *
  77.      * 2010-04-27 (v1.8):
  78.      *  + Added iPad Support
  79.      *
  80.      * 2009-08-18:
  81.      *  + Updated to support PHP 5.3 - removed all deprecated function calls
  82.      *  + Updated to remove all double quotes (") -- converted to single quotes (')
  83.      *
  84.      * 2009-04-27:
  85.      *  + Updated the IE check to remove a typo and bug (thanks John)
  86.      *
  87.      * 2009-04-22:
  88.      *  + Added detection for GoogleBot
  89.      *  + Added detection for the W3C Validator.
  90.      *  + Added detection for Yahoo! Slurp
  91.      *
  92.      * 2009-03-14:
  93.      *  + Added detection for iPods.
  94.      *  + Added Platform detection for iPhones
  95.      *  + Added Platform detection for iPods
  96.      *
  97.      * 2009-02-16: (Rick Hale)
  98.      *  + Added version detection for Android phones.
  99.      *
  100.      * 2008-12-09:
  101.      *  + Removed unused constant
  102.      *
  103.      * 2008-11-07:
  104.      *  + Added Google's Chrome to the detection list
  105.      *  + Added isBrowser(string) to the list of functions special thanks to
  106.      *    Daniel 'mavrick' Lang for the function concept (http://mavrick.id.au)
  107.      *
  108.      *
  109.      * Gary White noted: "Since browser detection is so unreliable, I am
  110.      * no longer maintaining this script. You are free to use and or
  111.      * modify/update it as you want, however the author assumes no
  112.      * responsibility for the accuracy of the detected values."
  113.      *
  114.      * Anyone experienced with Gary's script might be interested in these notes:
  115.      *
  116.      *   Added class constants
  117.      *   Added detection and version detection for Google's Chrome
  118.      *   Updated the version detection for Amaya
  119.      *   Updated the version detection for Firefox
  120.      *   Updated the version detection for Lynx
  121.      *   Updated the version detection for WebTV
  122.      *   Updated the version detection for NetPositive
  123.      *   Updated the version detection for IE
  124.      *   Updated the version detection for OmniWeb
  125.      *   Updated the version detection for iCab
  126.      *   Updated the version detection for Safari
  127.      *   Updated Safari to remove mobile devices (iPhone)
  128.      *   Added detection for iPhone
  129.      *   Added detection for robots
  130.      *   Added detection for mobile devices
  131.      *   Added detection for BlackBerry
  132.      *   Removed Netscape checks (matches heavily with firefox & mozilla)
  133.      *
  134.      */
  135.  
  136.     class Browser {
  137.         private $_agent = '';
  138.         private $_browser_name = '';
  139.         private $_version = '';
  140.         private $_platform = '';
  141.         private $_os = '';
  142.         private $_is_aol = false;
  143.         private $_is_mobile = false;
  144.         private $_is_robot = false;
  145.         private $_aol_version = '';
  146.  
  147.         const BROWSER_UNKNOWN = 'unknown';
  148.         const VERSION_UNKNOWN = 'unknown';
  149.  
  150.         const BROWSER_OPERA = 'Opera';                            // http://www.opera.com/
  151.         const BROWSER_OPERA_MINI = 'Opera Mini';                  // http://www.opera.com/mini/
  152.         const BROWSER_WEBTV = 'WebTV';                            // http://www.webtv.net/pc/
  153.         const BROWSER_IE = 'Internet Explorer';                   // http://www.microsoft.com/ie/
  154.         const BROWSER_POCKET_IE = 'Pocket Internet Explorer';     // http://en.wikipedia.org/wiki/Internet_Explorer_Mobile
  155.         const BROWSER_KONQUEROR = 'Konqueror';                    // http://www.konqueror.org/
  156.         const BROWSER_ICAB = 'iCab';                              // http://www.icab.de/
  157.         const BROWSER_OMNIWEB = 'OmniWeb';                        // http://www.omnigroup.com/applications/omniweb/
  158.         const BROWSER_FIREBIRD = 'Firebird';                      // http://www.ibphoenix.com/
  159.         const BROWSER_FIREFOX = 'Firefox';                        // http://www.mozilla.com/en-US/firefox/firefox.html
  160.         const BROWSER_ICEWEASEL = 'Iceweasel';                    // http://www.geticeweasel.org/
  161.         const BROWSER_SHIRETOKO = 'Shiretoko';                    // http://wiki.mozilla.org/Projects/shiretoko
  162.         const BROWSER_MOZILLA = 'Mozilla';                        // http://www.mozilla.com/en-US/
  163.         const BROWSER_AMAYA = 'Amaya';                            // http://www.w3.org/Amaya/
  164.         const BROWSER_LYNX = 'Lynx';                              // http://en.wikipedia.org/wiki/Lynx
  165.         const BROWSER_SAFARI = 'Safari';                          // http://apple.com
  166.         const BROWSER_IPHONE = 'iPhone';                          // http://apple.com
  167.         const BROWSER_IPOD = 'iPod';                              // http://apple.com
  168.         const BROWSER_IPAD = 'iPad';                              // http://apple.com
  169.         const BROWSER_CHROME = 'Chrome';                          // http://www.google.com/chrome
  170.         const BROWSER_ANDROID = 'Android';                        // http://www.android.com/
  171.         const BROWSER_GOOGLEBOT = 'GoogleBot';                    // http://en.wikipedia.org/wiki/Googlebot
  172.         const BROWSER_SLURP = 'Yahoo! Slurp';                     // http://en.wikipedia.org/wiki/Yahoo!_Slurp
  173.         const BROWSER_W3CVALIDATOR = 'W3C Validator';             // http://validator.w3.org/
  174.         const BROWSER_BLACKBERRY = 'BlackBerry';                  // http://www.blackberry.com/
  175.         const BROWSER_ICECAT = 'IceCat';                          // http://en.wikipedia.org/wiki/GNU_IceCat
  176.         const BROWSER_NOKIA_S60 = 'Nokia S60 OSS Browser';        // http://en.wikipedia.org/wiki/Web_Browser_for_S60
  177.         const BROWSER_NOKIA = 'Nokia Browser';                    // * all other WAP-based browsers on the Nokia Platform
  178.         const BROWSER_MSN = 'MSN Browser';                        // http://explorer.msn.com/
  179.         const BROWSER_MSNBOT = 'MSN Bot';                         // http://search.msn.com/msnbot.htm
  180.                                                                   // http://en.wikipedia.org/wiki/Msnbot  (used for Bing as well)
  181.        
  182.         const BROWSER_NETSCAPE_NAVIGATOR = 'Netscape Navigator';  // http://browser.netscape.com/ (DEPRECATED)
  183.         const BROWSER_GALEON = 'Galeon';                          // http://galeon.sourceforge.net/ (DEPRECATED)
  184.         const BROWSER_NETPOSITIVE = 'NetPositive';                // http://en.wikipedia.org/wiki/NetPositive (DEPRECATED)
  185.         const BROWSER_PHOENIX = 'Phoenix';                        // http://en.wikipedia.org/wiki/History_of_Mozilla_Firefox (DEPRECATED)
  186.  
  187.         const PLATFORM_UNKNOWN = 'unknown';
  188.         const PLATFORM_WINDOWS = 'Windows';
  189.         const PLATFORM_WINDOWS_CE = 'Windows CE';
  190.         const PLATFORM_APPLE = 'Apple';
  191.         const PLATFORM_LINUX = 'Linux';
  192.         const PLATFORM_OS2 = 'OS/2';
  193.         const PLATFORM_BEOS = 'BeOS';
  194.         const PLATFORM_IPHONE = 'iPhone';
  195.         const PLATFORM_IPOD = 'iPod';
  196.         const PLATFORM_IPAD = 'iPad';
  197.         const PLATFORM_BLACKBERRY = 'BlackBerry';
  198.         const PLATFORM_NOKIA = 'Nokia';
  199.         const PLATFORM_FREEBSD = 'FreeBSD';
  200.         const PLATFORM_OPENBSD = 'OpenBSD';
  201.         const PLATFORM_NETBSD = 'NetBSD';
  202.         const PLATFORM_SUNOS = 'SunOS';
  203.         const PLATFORM_OPENSOLARIS = 'OpenSolaris';
  204.         const PLATFORM_ANDROID = 'Android';
  205.        
  206.         const OPERATING_SYSTEM_UNKNOWN = 'unknown';
  207.  
  208.         public function Browser($useragent="") {
  209.             $this->reset();
  210.             if( $useragent != "" ) {
  211.                 $this->setUserAgent($useragent);
  212.             }
  213.             else {
  214.                 $this->determine();
  215.             }
  216.         }
  217.  
  218.         /**
  219.         * Reset all properties
  220.         */
  221.         public function reset() {
  222.             $this->_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";
  223.             $this->_browser_name = self::BROWSER_UNKNOWN;
  224.             $this->_version = self::VERSION_UNKNOWN;
  225.             $this->_platform = self::PLATFORM_UNKNOWN;
  226.             $this->_os = self::OPERATING_SYSTEM_UNKNOWN;
  227.             $this->_is_aol = false;
  228.             $this->_is_mobile = false;
  229.             $this->_is_robot = false;
  230.             $this->_aol_version = self::VERSION_UNKNOWN;
  231.         }
  232.  
  233.         /**
  234.         * Check to see if the specific browser is valid
  235.         * @param string $browserName
  236.         * @return True if the browser is the specified browser
  237.         */
  238.         function isBrowser($browserName) { return( 0 == strcasecmp($this->_browser_name, trim($browserName))); }
  239.  
  240.         /**
  241.         * The name of the browser.  All return types are from the class contants
  242.         * @return string Name of the browser
  243.         */
  244.         public function getBrowser() { return $this->_browser_name; }
  245.         /**
  246.         * Set the name of the browser
  247.         * @param $browser The name of the Browser
  248.         */
  249.         public function setBrowser($browser) { return $this->_browser_name = $browser; }
  250.         /**
  251.         * The name of the platform.  All return types are from the class contants
  252.         * @return string Name of the browser
  253.         */
  254.         public function getPlatform() { return $this->_platform; }
  255.         /**
  256.         * Set the name of the platform
  257.         * @param $platform The name of the Platform
  258.         */
  259.         public function setPlatform($platform) { return $this->_platform = $platform; }
  260.         /**
  261.         * The version of the browser.
  262.         * @return string Version of the browser (will only contain alpha-numeric characters and a period)
  263.         */
  264.         public function getVersion() { return $this->_version; }
  265.         /**
  266.         * Set the version of the browser
  267.         * @param $version The version of the Browser
  268.         */
  269.         public function setVersion($version) { $this->_version = preg_replace('/[^0-9,.,a-z,A-Z-]/','',$version); }
  270.         /**
  271.         * The version of AOL.
  272.         * @return string Version of AOL (will only contain alpha-numeric characters and a period)
  273.         */
  274.         public function getAolVersion() { return $this->_aol_version; }
  275.         /**
  276.         * Set the version of AOL
  277.         * @param $version The version of AOL
  278.         */
  279.         public function setAolVersion($version) { $this->_aol_version = preg_replace('/[^0-9,.,a-z,A-Z]/','',$version); }
  280.         /**
  281.         * Is the browser from AOL?
  282.         * @return boolean True if the browser is from AOL otherwise false
  283.         */
  284.         public function isAol() { return $this->_is_aol; }
  285.         /**
  286.         * Is the browser from a mobile device?
  287.         * @return boolean True if the browser is from a mobile device otherwise false
  288.         */
  289.         public function isMobile() { return $this->_is_mobile; }
  290.         /**
  291.         * Is the browser from a robot (ex Slurp,GoogleBot)?
  292.         * @return boolean True if the browser is from a robot otherwise false
  293.         */
  294.         public function isRobot() { return $this->_is_robot; }
  295.         /**
  296.         * Set the browser to be from AOL
  297.         * @param $isAol
  298.         */
  299.         public function setAol($isAol) { $this->_is_aol = $isAol; }
  300.         /**
  301.          * Set the Browser to be mobile
  302.          * @param boolean $value is the browser a mobile brower or not
  303.          */
  304.         protected function setMobile($value=true) { $this->_is_mobile = $value; }
  305.         /**
  306.          * Set the Browser to be a robot
  307.          * @param boolean $value is the browser a robot or not
  308.          */
  309.         protected function setRobot($value=true) { $this->_is_robot = $value; }
  310.         /**
  311.         * Get the user agent value in use to determine the browser
  312.         * @return string The user agent from the HTTP header
  313.         */
  314.         public function getUserAgent() { return $this->_agent; }
  315.         /**
  316.         * Set the user agent value (the construction will use the HTTP header value - this will overwrite it)
  317.         * @param $agent_string The value for the User Agent
  318.         */
  319.         public function setUserAgent($agent_string) {
  320.             $this->reset();
  321.             $this->_agent = $agent_string;
  322.             $this->determine();
  323.         }
  324.         /**
  325.          * Used to determine if the browser is actually "chromeframe"
  326.          * @since 1.7
  327.          * @return boolean True if the browser is using chromeframe
  328.          */
  329.         public function isChromeFrame() {
  330.             return( strpos($this->_agent,"chromeframe") !== false );
  331.         }
  332.         /**
  333.         * Returns a formatted string with a summary of the details of the browser.
  334.         * @return string formatted string with a summary of the browser
  335.         */
  336.         public function __toString() {
  337.             return "<strong>Browser Name:</strong>{$this->getBrowser()}<br/>\n" .
  338.                    "<strong>Browser Version:</strong>{$this->getVersion()}<br/>\n" .
  339.                    "<strong>Browser User Agent String:</strong>{$this->getUserAgent()}<br/>\n" .
  340.                    "<strong>Platform:</strong>{$this->getPlatform()}<br/>";
  341.         }
  342.         /**
  343.          * Protected routine to calculate and determine what the browser is in use (including platform)
  344.          */
  345.         protected function determine() {
  346.             $this->checkPlatform();
  347.             $this->checkBrowsers();
  348.             $this->checkForAol();
  349.         }
  350.         /**
  351.          * Protected routine to determine the browser type
  352.          * @return boolean True if the browser was detected otherwise false
  353.          */
  354.          protected function checkBrowsers() {
  355.             return (
  356.                 // well-known, well-used
  357.                 // Special Notes:
  358.                 // (1) Opera must be checked before FireFox due to the odd
  359.                 //     user agents used in some older versions of Opera
  360.                 // (2) WebTV is strapped onto Internet Explorer so we must
  361.                 //     check for WebTV before IE
  362.                 // (3) (deprecated) Galeon is based on Firefox and needs to be
  363.                 //     tested before Firefox is tested
  364.                 // (4) OmniWeb is based on Safari so OmniWeb check must occur
  365.                 //     before Safari
  366.                 // (5) Netscape 9+ is based on Firefox so Netscape checks
  367.                 //     before FireFox are necessary
  368.                 $this->checkBrowserWebTv() ||
  369.                 $this->checkBrowserInternetExplorer() ||
  370.                 $this->checkBrowserOpera() ||
  371.                 $this->checkBrowserGaleon() ||
  372.                 $this->checkBrowserNetscapeNavigator9Plus() ||
  373.                 $this->checkBrowserFirefox() ||
  374.                 $this->checkBrowserChrome() ||
  375.                 $this->checkBrowserOmniWeb() ||
  376.  
  377.                 // common mobile
  378.                 $this->checkBrowserAndroid() ||
  379.                 $this->checkBrowseriPad() ||
  380.                 $this->checkBrowseriPod() ||
  381.                 $this->checkBrowseriPhone() ||
  382.                 $this->checkBrowserBlackBerry() ||
  383.                 $this->checkBrowserNokia() ||
  384.  
  385.                 // common bots
  386.                 $this->checkBrowserGoogleBot() ||
  387.                 $this->checkBrowserMSNBot() ||
  388.                 $this->checkBrowserSlurp() ||
  389.  
  390.                 // WebKit base check (post mobile and others)
  391.                 $this->checkBrowserSafari() ||
  392.                
  393.                 // everyone else
  394.                 $this->checkBrowserNetPositive() ||
  395.                 $this->checkBrowserFirebird() ||
  396.                 $this->checkBrowserKonqueror() ||
  397.                 $this->checkBrowserIcab() ||
  398.                 $this->checkBrowserPhoenix() ||
  399.                 $this->checkBrowserAmaya() ||
  400.                 $this->checkBrowserLynx() ||
  401.                 $this->checkBrowserShiretoko() ||
  402.                 $this->checkBrowserIceCat() ||
  403.                 $this->checkBrowserW3CValidator() ||
  404.                 $this->checkBrowserMozilla() /* Mozilla is such an open standard that you must check it last */
  405.             );
  406.         }
  407.  
  408.         /**
  409.          * Determine if the user is using a BlackBerry (last updated 1.7)
  410.          * @return boolean True if the browser is the BlackBerry browser otherwise false
  411.          */
  412.         protected function checkBrowserBlackBerry() {
  413.             if( stripos($this->_agent,'blackberry') !== false ) {
  414.                 $aresult = explode("/",stristr($this->_agent,"BlackBerry"));
  415.                 $aversion = explode(' ',$aresult[1]);
  416.                 $this->setVersion($aversion[0]);
  417.                 $this->_browser_name = self::BROWSER_BLACKBERRY;
  418.                 $this->setMobile(true);
  419.                 return true;
  420.             }
  421.             return false;
  422.         }
  423.  
  424.         /**
  425.          * Determine if the user is using an AOL User Agent (last updated 1.7)
  426.          * @return boolean True if the browser is from AOL otherwise false
  427.          */
  428.         protected function checkForAol() {
  429.             $this->setAol(false);
  430.             $this->setAolVersion(self::VERSION_UNKNOWN);
  431.  
  432.             if( stripos($this->_agent,'aol') !== false ) {
  433.                 $aversion = explode(' ',stristr($this->_agent, 'AOL'));
  434.                 $this->setAol(true);
  435.                 $this->setAolVersion(preg_replace('/[^0-9\.a-z]/i', '', $aversion[1]));
  436.                 return true;
  437.             }
  438.             return false;
  439.         }
  440.  
  441.         /**
  442.          * Determine if the browser is the GoogleBot or not (last updated 1.7)
  443.          * @return boolean True if the browser is the GoogletBot otherwise false
  444.          */
  445.         protected function checkBrowserGoogleBot() {
  446.             if( stripos($this->_agent,'googlebot') !== false ) {
  447.                 $aresult = explode('/',stristr($this->_agent,'googlebot'));
  448.                 $aversion = explode(' ',$aresult[1]);
  449.                 $this->setVersion(str_replace(';','',$aversion[0]));
  450.                 $this->_browser_name = self::BROWSER_GOOGLEBOT;
  451.                 $this->setRobot(true);
  452.                 return true;
  453.             }
  454.             return false;
  455.         }
  456.  
  457.         /**
  458.          * Determine if the browser is the MSNBot or not (last updated 1.9)
  459.          * @return boolean True if the browser is the MSNBot otherwise false
  460.          */
  461.         protected function checkBrowserMSNBot() {
  462.             if( stripos($this->_agent,"msnbot") !== false ) {
  463.                 $aresult = explode("/",stristr($this->_agent,"msnbot"));
  464.                 $aversion = explode(" ",$aresult[1]);
  465.                 $this->setVersion(str_replace(";","",$aversion[0]));
  466.                 $this->_browser_name = self::BROWSER_MSNBOT;
  467.                 $this->setRobot(true);
  468.                 return true;
  469.             }
  470.             return false;
  471.         }      
  472.        
  473.         /**
  474.          * Determine if the browser is the W3C Validator or not (last updated 1.7)
  475.          * @return boolean True if the browser is the W3C Validator otherwise false
  476.          */
  477.         protected function checkBrowserW3CValidator() {
  478.             if( stripos($this->_agent,'W3C-checklink') !== false ) {
  479.                 $aresult = explode('/',stristr($this->_agent,'W3C-checklink'));
  480.                 $aversion = explode(' ',$aresult[1]);
  481.                 $this->setVersion($aversion[0]);
  482.                 $this->_browser_name = self::BROWSER_W3CVALIDATOR;
  483.                 return true;
  484.             }
  485.             else if( stripos($this->_agent,'W3C_Validator') !== false ) {
  486.                 // Some of the Validator versions do not delineate w/ a slash - add it back in
  487.                 $ua = str_replace("W3C_Validator ", "W3C_Validator/", $this->_agent);
  488.                 $aresult = explode('/',stristr($ua,'W3C_Validator'));
  489.                 $aversion = explode(' ',$aresult[1]);
  490.                 $this->setVersion($aversion[0]);
  491.                 $this->_browser_name = self::BROWSER_W3CVALIDATOR;
  492.                 return true;
  493.             }
  494.             return false;
  495.         }
  496.  
  497.         /**
  498.          * Determine if the browser is the Yahoo! Slurp Robot or not (last updated 1.7)
  499.          * @return boolean True if the browser is the Yahoo! Slurp Robot otherwise false
  500.          */
  501.         protected function checkBrowserSlurp() {
  502.             if( stripos($this->_agent,'slurp') !== false ) {
  503.                 $aresult = explode('/',stristr($this->_agent,'Slurp'));
  504.                 $aversion = explode(' ',$aresult[1]);
  505.                 $this->setVersion($aversion[0]);
  506.                 $this->_browser_name = self::BROWSER_SLURP;
  507.                 $this->setRobot(true);
  508.                 $this->setMobile(false);
  509.                 return true;
  510.             }
  511.             return false;
  512.         }
  513.  
  514.         /**
  515.          * Determine if the browser is Internet Explorer or not (last updated 1.7)
  516.          * @return boolean True if the browser is Internet Explorer otherwise false
  517.          */
  518.         protected function checkBrowserInternetExplorer() {
  519.  
  520.             // Test for v1 - v1.5 IE
  521.             if( stripos($this->_agent,'microsoft internet explorer') !== false ) {
  522.                 $this->setBrowser(self::BROWSER_IE);
  523.                 $this->setVersion('1.0');
  524.                 $aresult = stristr($this->_agent, '/');
  525.                 if( preg_match('/308|425|426|474|0b1/i', $aresult) ) {
  526.                     $this->setVersion('1.5');
  527.                 }
  528.                 return true;
  529.             }
  530.             // Test for versions > 1.5
  531.             else if( stripos($this->_agent,'msie') !== false && stripos($this->_agent,'opera') === false ) {
  532.                 // See if the browser is the odd MSN Explorer
  533.                 if( stripos($this->_agent,'msnb') !== false ) {
  534.                     $aresult = explode(' ',stristr(str_replace(';','; ',$this->_agent),'MSN'));
  535.                     $this->setBrowser( self::BROWSER_MSN );
  536.                     $this->setVersion(str_replace(array('(',')',';'),'',$aresult[1]));
  537.                     return true;
  538.                 }
  539.                 $aresult = explode(' ',stristr(str_replace(';','; ',$this->_agent),'msie'));
  540.                 $this->setBrowser( self::BROWSER_IE );
  541.                 $this->setVersion(str_replace(array('(',')',';'),'',$aresult[1]));
  542.                 return true;
  543.             }
  544.             // Test for Pocket IE
  545.             else if( stripos($this->_agent,'mspie') !== false || stripos($this->_agent,'pocket') !== false ) {
  546.                 $aresult = explode(' ',stristr($this->_agent,'mspie'));
  547.                 $this->setPlatform( self::PLATFORM_WINDOWS_CE );
  548.                 $this->setBrowser( self::BROWSER_POCKET_IE );
  549.                 $this->setMobile(true);
  550.  
  551.                 if( stripos($this->_agent,'mspie') !== false ) {
  552.                     $this->setVersion($aresult[1]);
  553.                 }
  554.                 else {
  555.                     $aversion = explode('/',$this->_agent);
  556.                     $this->setVersion($aversion[1]);
  557.                 }
  558.                 return true;
  559.             }
  560.             return false;
  561.         }
  562.  
  563.         /**
  564.          * Determine if the browser is Opera or not (last updated 1.7)
  565.          * @return boolean True if the browser is Opera otherwise false
  566.          */
  567.         protected function checkBrowserOpera() {
  568.             if( stripos($this->_agent,'opera mini') !== false ) {
  569.                 $resultant = stristr($this->_agent, 'opera mini');
  570.                 if( preg_match('/\//',$resultant) ) {
  571.                     $aresult = explode('/',$resultant);
  572.                     $aversion = explode(' ',$aresult[1]);
  573.                     $this->setVersion($aversion[0]);
  574.                 }
  575.                 else {
  576.                     $aversion = explode(' ',stristr($resultant,'opera mini'));
  577.                     $this->setVersion($aversion[1]);
  578.                 }
  579.                 $this->_browser_name = self::BROWSER_OPERA_MINI;
  580.                 $this->setMobile(true);
  581.                 return true;
  582.             }
  583.             else if( stripos($this->_agent,'opera') !== false ) {
  584.                 $resultant = stristr($this->_agent, 'opera');
  585.                 if( preg_match('/Version\/(10.*)$/',$resultant,$matches) ) {
  586.                     $this->setVersion($matches[1]);
  587.                 }
  588.                 else if( preg_match('/\//',$resultant) ) {
  589.                     $aresult = explode('/',str_replace("("," ",$resultant));
  590.                     $aversion = explode(' ',$aresult[1]);
  591.                     $this->setVersion($aversion[0]);
  592.                 }
  593.                 else {
  594.                     $aversion = explode(' ',stristr($resultant,'opera'));
  595.                     $this->setVersion(isset($aversion[1])?$aversion[1]:"");
  596.                 }
  597.                 $this->_browser_name = self::BROWSER_OPERA;
  598.                 return true;
  599.             }
  600.             return false;
  601.         }
  602.  
  603.         /**
  604.          * Determine if the browser is Chrome or not (last updated 1.7)
  605.          * @return boolean True if the browser is Chrome otherwise false
  606.          */
  607.         protected function checkBrowserChrome() {
  608.             if( stripos($this->_agent,'Chrome') !== false ) {
  609.                 $aresult = explode('/',stristr($this->_agent,'Chrome'));
  610.                 $aversion = explode(' ',$aresult[1]);
  611.                 $this->setVersion($aversion[0]);
  612.                 $this->setBrowser(self::BROWSER_CHROME);
  613.                 return true;
  614.             }
  615.             return false;
  616.         }
  617.  
  618.  
  619.         /**
  620.          * Determine if the browser is WebTv or not (last updated 1.7)
  621.          * @return boolean True if the browser is WebTv otherwise false
  622.          */
  623.         protected function checkBrowserWebTv() {
  624.             if( stripos($this->_agent,'webtv') !== false ) {
  625.                 $aresult = explode('/',stristr($this->_agent,'webtv'));
  626.                 $aversion = explode(' ',$aresult[1]);
  627.                 $this->setVersion($aversion[0]);
  628.                 $this->setBrowser(self::BROWSER_WEBTV);
  629.                 return true;
  630.             }
  631.             return false;
  632.         }
  633.  
  634.         /**
  635.          * Determine if the browser is NetPositive or not (last updated 1.7)
  636.          * @return boolean True if the browser is NetPositive otherwise false
  637.          */
  638.         protected function checkBrowserNetPositive() {
  639.             if( stripos($this->_agent,'NetPositive') !== false ) {
  640.                 $aresult = explode('/',stristr($this->_agent,'NetPositive'));
  641.                 $aversion = explode(' ',$aresult[1]);
  642.                 $this->setVersion(str_replace(array('(',')',';'),'',$aversion[0]));
  643.                 $this->setBrowser(self::BROWSER_NETPOSITIVE);
  644.                 return true;
  645.             }
  646.             return false;
  647.         }
  648.  
  649.         /**
  650.          * Determine if the browser is Galeon or not (last updated 1.7)
  651.          * @return boolean True if the browser is Galeon otherwise false
  652.          */
  653.         protected function checkBrowserGaleon() {
  654.             if( stripos($this->_agent,'galeon') !== false ) {
  655.                 $aresult = explode(' ',stristr($this->_agent,'galeon'));
  656.                 $aversion = explode('/',$aresult[0]);
  657.                 $this->setVersion($aversion[1]);
  658.                 $this->setBrowser(self::BROWSER_GALEON);
  659.                 return true;
  660.             }
  661.             return false;
  662.         }
  663.  
  664.         /**
  665.          * Determine if the browser is Konqueror or not (last updated 1.7)
  666.          * @return boolean True if the browser is Konqueror otherwise false
  667.          */
  668.         protected function checkBrowserKonqueror() {
  669.             if( stripos($this->_agent,'Konqueror') !== false ) {
  670.                 $aresult = explode(' ',stristr($this->_agent,'Konqueror'));
  671.                 $aversion = explode('/',$aresult[0]);
  672.                 $this->setVersion($aversion[1]);
  673.                 $this->setBrowser(self::BROWSER_KONQUEROR);
  674.                 return true;
  675.             }
  676.             return false;
  677.         }
  678.  
  679.         /**
  680.          * Determine if the browser is iCab or not (last updated 1.7)
  681.          * @return boolean True if the browser is iCab otherwise false
  682.          */
  683.         protected function checkBrowserIcab() {
  684.             if( stripos($this->_agent,'icab') !== false ) {
  685.                 $aversion = explode(' ',stristr(str_replace('/',' ',$this->_agent),'icab'));
  686.                 $this->setVersion($aversion[1]);
  687.                 $this->setBrowser(self::BROWSER_ICAB);
  688.                 return true;
  689.             }
  690.             return false;
  691.         }
  692.  
  693.         /**
  694.          * Determine if the browser is OmniWeb or not (last updated 1.7)
  695.          * @return boolean True if the browser is OmniWeb otherwise false
  696.          */
  697.         protected function checkBrowserOmniWeb() {
  698.             if( stripos($this->_agent,'omniweb') !== false ) {
  699.                 $aresult = explode('/',stristr($this->_agent,'omniweb'));
  700.                 $aversion = explode(' ',isset($aresult[1])?$aresult[1]:"");
  701.                 $this->setVersion($aversion[0]);
  702.                 $this->setBrowser(self::BROWSER_OMNIWEB);
  703.                 return true;
  704.             }
  705.             return false;
  706.         }
  707.  
  708.         /**
  709.          * Determine if the browser is Phoenix or not (last updated 1.7)
  710.          * @return boolean True if the browser is Phoenix otherwise false
  711.          */
  712.         protected function checkBrowserPhoenix() {
  713.             if( stripos($this->_agent,'Phoenix') !== false ) {
  714.                 $aversion = explode('/',stristr($this->_agent,'Phoenix'));
  715.                 $this->setVersion($aversion[1]);
  716.                 $this->setBrowser(self::BROWSER_PHOENIX);
  717.                 return true;
  718.             }
  719.             return false;
  720.         }
  721.  
  722.         /**
  723.          * Determine if the browser is Firebird or not (last updated 1.7)
  724.          * @return boolean True if the browser is Firebird otherwise false
  725.          */
  726.         protected function checkBrowserFirebird() {
  727.             if( stripos($this->_agent,'Firebird') !== false ) {
  728.                 $aversion = explode('/',stristr($this->_agent,'Firebird'));
  729.                 $this->setVersion($aversion[1]);
  730.                 $this->setBrowser(self::BROWSER_FIREBIRD);
  731.                 return true;
  732.             }
  733.             return false;
  734.         }
  735.  
  736.         /**
  737.          * Determine if the browser is Netscape Navigator 9+ or not (last updated 1.7)
  738.          * NOTE: (http://browser.netscape.com/ - Official support ended on March 1st, 2008)
  739.          * @return boolean True if the browser is Netscape Navigator 9+ otherwise false
  740.          */
  741.         protected function checkBrowserNetscapeNavigator9Plus() {
  742.             if( stripos($this->_agent,'Firefox') !== false && preg_match('/Navigator\/([^ ]*)/i',$this->_agent,$matches) ) {
  743.                 $this->setVersion($matches[1]);
  744.                 $this->setBrowser(self::BROWSER_NETSCAPE_NAVIGATOR);
  745.                 return true;
  746.             }
  747.             else if( stripos($this->_agent,'Firefox') === false && preg_match('/Netscape6?\/([^ ]*)/i',$this->_agent,$matches) ) {
  748.                 $this->setVersion($matches[1]);
  749.                 $this->setBrowser(self::BROWSER_NETSCAPE_NAVIGATOR);
  750.                 return true;
  751.             }
  752.             return false;
  753.         }
  754.  
  755.         /**
  756.          * Determine if the browser is Shiretoko or not (https://wiki.mozilla.org/Projects/shiretoko) (last updated 1.7)
  757.          * @return boolean True if the browser is Shiretoko otherwise false
  758.          */
  759.         protected function checkBrowserShiretoko() {
  760.             if( stripos($this->_agent,'Mozilla') !== false && preg_match('/Shiretoko\/([^ ]*)/i',$this->_agent,$matches) ) {
  761.                 $this->setVersion($matches[1]);
  762.                 $this->setBrowser(self::BROWSER_SHIRETOKO);
  763.                 return true;
  764.             }
  765.             return false;
  766.         }
  767.  
  768.         /**
  769.          * Determine if the browser is Ice Cat or not (http://en.wikipedia.org/wiki/GNU_IceCat) (last updated 1.7)
  770.          * @return boolean True if the browser is Ice Cat otherwise false
  771.          */
  772.         protected function checkBrowserIceCat() {
  773.             if( stripos($this->_agent,'Mozilla') !== false && preg_match('/IceCat\/([^ ]*)/i',$this->_agent,$matches) ) {
  774.                 $this->setVersion($matches[1]);
  775.                 $this->setBrowser(self::BROWSER_ICECAT);
  776.                 return true;
  777.             }
  778.             return false;
  779.         }
  780.  
  781.         /**
  782.          * Determine if the browser is Nokia or not (last updated 1.7)
  783.          * @return boolean True if the browser is Nokia otherwise false
  784.          */
  785.         protected function checkBrowserNokia() {
  786.             if( preg_match("/Nokia([^\/]+)\/([^ SP]+)/i",$this->_agent,$matches) ) {
  787.                 $this->setVersion($matches[2]);
  788.                 if( stripos($this->_agent,'Series60') !== false || strpos($this->_agent,'S60') !== false ) {
  789.                     $this->setBrowser(self::BROWSER_NOKIA_S60);
  790.                 }
  791.                 else {
  792.                     $this->setBrowser( self::BROWSER_NOKIA );
  793.                 }
  794.                 $this->setMobile(true);
  795.                 return true;
  796.             }
  797.             return false;
  798.         }
  799.  
  800.         /**
  801.          * Determine if the browser is Firefox or not (last updated 1.7)
  802.          * @return boolean True if the browser is Firefox otherwise false
  803.          */
  804.         protected function checkBrowserFirefox() {
  805.             if( stripos($this->_agent,'safari') === false ) {
  806.                 if( preg_match("/Firefox[\/ \(]([^ ;\)]+)/i",$this->_agent,$matches) ) {
  807.                     $this->setVersion($matches[1]);
  808.                     $this->setBrowser(self::BROWSER_FIREFOX);
  809.                     return true;
  810.                 }
  811.                 else if( preg_match("/Firefox$/i",$this->_agent,$matches) ) {
  812.                     $this->setVersion("");
  813.                     $this->setBrowser(self::BROWSER_FIREFOX);
  814.                     return true;
  815.                 }
  816.             }
  817.             return false;
  818.         }
  819.  
  820.         /**
  821.          * Determine if the browser is Firefox or not (last updated 1.7)
  822.          * @return boolean True if the browser is Firefox otherwise false
  823.          */
  824.         protected function checkBrowserIceweasel() {
  825.             if( stripos($this->_agent,'Iceweasel') !== false ) {
  826.                 $aresult = explode('/',stristr($this->_agent,'Iceweasel'));
  827.                 $aversion = explode(' ',$aresult[1]);
  828.                 $this->setVersion($aversion[0]);
  829.                 $this->setBrowser(self::BROWSER_ICEWEASEL);
  830.                 return true;
  831.             }
  832.             return false;
  833.         }
  834.         /**
  835.          * Determine if the browser is Mozilla or not (last updated 1.7)
  836.          * @return boolean True if the browser is Mozilla otherwise false
  837.          */
  838.         protected function checkBrowserMozilla() {
  839.             if( stripos($this->_agent,'mozilla') !== false  && preg_match('/rv:[0-9].[0-9][a-b]?/i',$this->_agent) && stripos($this->_agent,'netscape') === false) {
  840.                 $aversion = explode(' ',stristr($this->_agent,'rv:'));
  841.                 preg_match('/rv:[0-9].[0-9][a-b]?/i',$this->_agent,$aversion);
  842.                 $this->setVersion(str_replace('rv:','',$aversion[0]));
  843.                 $this->setBrowser(self::BROWSER_MOZILLA);
  844.                 return true;
  845.             }
  846.             else if( stripos($this->_agent,'mozilla') !== false && preg_match('/rv:[0-9]\.[0-9]/i',$this->_agent) && stripos($this->_agent,'netscape') === false ) {
  847.                 $aversion = explode('',stristr($this->_agent,'rv:'));
  848.                 $this->setVersion(str_replace('rv:','',$aversion[0]));
  849.                 $this->setBrowser(self::BROWSER_MOZILLA);
  850.                 return true;
  851.             }
  852.             else if( stripos($this->_agent,'mozilla') !== false  && preg_match('/mozilla\/([^ ]*)/i',$this->_agent,$matches) && stripos($this->_agent,'netscape') === false ) {
  853.                 $this->setVersion($matches[1]);
  854.                 $this->setBrowser(self::BROWSER_MOZILLA);
  855.                 return true;
  856.             }
  857.             return false;
  858.         }
  859.  
  860.         /**
  861.          * Determine if the browser is Lynx or not (last updated 1.7)
  862.          * @return boolean True if the browser is Lynx otherwise false
  863.          */
  864.         protected function checkBrowserLynx() {
  865.             if( stripos($this->_agent,'lynx') !== false ) {
  866.                 $aresult = explode('/',stristr($this->_agent,'Lynx'));
  867.                 $aversion = explode(' ',(isset($aresult[1])?$aresult[1]:""));
  868.                 $this->setVersion($aversion[0]);
  869.                 $this->setBrowser(self::BROWSER_LYNX);
  870.                 return true;
  871.             }
  872.             return false;
  873.         }
  874.  
  875.         /**
  876.          * Determine if the browser is Amaya or not (last updated 1.7)
  877.          * @return boolean True if the browser is Amaya otherwise false
  878.          */
  879.         protected function checkBrowserAmaya() {
  880.             if( stripos($this->_agent,'amaya') !== false ) {
  881.                 $aresult = explode('/',stristr($this->_agent,'Amaya'));
  882.                 $aversion = explode(' ',$aresult[1]);
  883.                 $this->setVersion($aversion[0]);
  884.                 $this->setBrowser(self::BROWSER_AMAYA);
  885.                 return true;
  886.             }
  887.             return false;
  888.         }
  889.  
  890.         /**
  891.          * Determine if the browser is Safari or not (last updated 1.7)
  892.          * @return boolean True if the browser is Safari otherwise false
  893.          */
  894.         protected function checkBrowserSafari() {
  895.             if( stripos($this->_agent,'Safari') !== false && stripos($this->_agent,'iPhone') === false && stripos($this->_agent,'iPod') === false ) {
  896.                 $aresult = explode('/',stristr($this->_agent,'Version'));
  897.                 if( isset($aresult[1]) ) {
  898.                     $aversion = explode(' ',$aresult[1]);
  899.                     $this->setVersion($aversion[0]);
  900.                 }
  901.                 else {
  902.                     $this->setVersion(self::VERSION_UNKNOWN);
  903.                 }
  904.                 $this->setBrowser(self::BROWSER_SAFARI);
  905.                 return true;
  906.             }
  907.             return false;
  908.         }
  909.  
  910.         /**
  911.          * Determine if the browser is iPhone or not (last updated 1.7)
  912.          * @return boolean True if the browser is iPhone otherwise false
  913.          */
  914.         protected function checkBrowseriPhone() {
  915.             if( stripos($this->_agent,'iPhone') !== false ) {
  916.                 $aresult = explode('/',stristr($this->_agent,'Version'));
  917.                 if( isset($aresult[1]) ) {
  918.                     $aversion = explode(' ',$aresult[1]);
  919.                     $this->setVersion($aversion[0]);
  920.                 }
  921.                 else {
  922.                     $this->setVersion(self::VERSION_UNKNOWN);
  923.                 }
  924.                 $this->setMobile(true);
  925.                 $this->setBrowser(self::BROWSER_IPHONE);
  926.                 return true;
  927.             }
  928.             return false;
  929.         }
  930.  
  931.         /**
  932.          * Determine if the browser is iPod or not (last updated 1.7)
  933.          * @return boolean True if the browser is iPod otherwise false
  934.          */
  935.         protected function checkBrowseriPad() {
  936.             if( stripos($this->_agent,'iPad') !== false ) {
  937.                 $aresult = explode('/',stristr($this->_agent,'Version'));
  938.                 if( isset($aresult[1]) ) {
  939.                     $aversion = explode(' ',$aresult[1]);
  940.                     $this->setVersion($aversion[0]);
  941.                 }
  942.                 else {
  943.                     $this->setVersion(self::VERSION_UNKNOWN);
  944.                 }
  945.                 $this->setMobile(true);
  946.                 $this->setBrowser(self::BROWSER_IPAD);
  947.                 return true;
  948.             }
  949.             return false;
  950.         }
  951.  
  952.         /**
  953.          * Determine if the browser is iPod or not (last updated 1.7)
  954.          * @return boolean True if the browser is iPod otherwise false
  955.          */
  956.         protected function checkBrowseriPod() {
  957.             if( stripos($this->_agent,'iPod') !== false ) {
  958.                 $aresult = explode('/',stristr($this->_agent,'Version'));
  959.                 if( isset($aresult[1]) ) {
  960.                     $aversion = explode(' ',$aresult[1]);
  961.                     $this->setVersion($aversion[0]);
  962.                 }
  963.                 else {
  964.                     $this->setVersion(self::VERSION_UNKNOWN);
  965.                 }
  966.                 $this->setMobile(true);
  967.                 $this->setBrowser(self::BROWSER_IPOD);
  968.                 return true;
  969.             }
  970.             return false;
  971.         }
  972.  
  973.         /**
  974.          * Determine if the browser is Android or not (last updated 1.7)
  975.          * @return boolean True if the browser is Android otherwise false
  976.          */
  977.         protected function checkBrowserAndroid() {
  978.             if( stripos($this->_agent,'Android') !== false ) {
  979.                 $aresult = explode(' ',stristr($this->_agent,'Android'));
  980.                 if( isset($aresult[1]) ) {
  981.                     $aversion = explode(' ',$aresult[1]);
  982.                     $this->setVersion($aversion[0]);
  983.                 }
  984.                 else {
  985.                     $this->setVersion(self::VERSION_UNKNOWN);
  986.                 }
  987.                 $this->setMobile(true);
  988.                 $this->setBrowser(self::BROWSER_ANDROID);
  989.                 return true;
  990.             }
  991.             return false;
  992.         }
  993.  
  994.         /**
  995.          * Determine the user's platform (last updated 1.7)
  996.          */
  997.         protected function checkPlatform() {
  998.             if( stripos($this->_agent, 'windows') !== false ) {
  999.                 $this->_platform = self::PLATFORM_WINDOWS;
  1000.             }
  1001.             else if( stripos($this->_agent, 'iPad') !== false ) {
  1002.                 $this->_platform = self::PLATFORM_IPAD;
  1003.             }
  1004.             else if( stripos($this->_agent, 'iPod') !== false ) {
  1005.                 $this->_platform = self::PLATFORM_IPOD;
  1006.             }
  1007.             else if( stripos($this->_agent, 'iPhone') !== false ) {
  1008.                 $this->_platform = self::PLATFORM_IPHONE;
  1009.             }
  1010.             elseif( stripos($this->_agent, 'mac') !== false ) {
  1011.                 $this->_platform = self::PLATFORM_APPLE;
  1012.             }
  1013.             elseif( stripos($this->_agent, 'android') !== false ) {
  1014.                 $this->_platform = self::PLATFORM_ANDROID;
  1015.             }
  1016.             elseif( stripos($this->_agent, 'linux') !== false ) {
  1017.                 $this->_platform = self::PLATFORM_LINUX;
  1018.             }
  1019.             else if( stripos($this->_agent, 'Nokia') !== false ) {
  1020.                 $this->_platform = self::PLATFORM_NOKIA;
  1021.             }
  1022.             else if( stripos($this->_agent, 'BlackBerry') !== false ) {
  1023.                 $this->_platform = self::PLATFORM_BLACKBERRY;
  1024.             }
  1025.             elseif( stripos($this->_agent,'FreeBSD') !== false ) {
  1026.                 $this->_platform = self::PLATFORM_FREEBSD;
  1027.             }
  1028.             elseif( stripos($this->_agent,'OpenBSD') !== false ) {
  1029.                 $this->_platform = self::PLATFORM_OPENBSD;
  1030.             }
  1031.             elseif( stripos($this->_agent,'NetBSD') !== false ) {
  1032.                 $this->_platform = self::PLATFORM_NETBSD;
  1033.             }
  1034.             elseif( stripos($this->_agent, 'OpenSolaris') !== false ) {
  1035.                 $this->_platform = self::PLATFORM_OPENSOLARIS;
  1036.             }
  1037.             elseif( stripos($this->_agent, 'SunOS') !== false ) {
  1038.                 $this->_platform = self::PLATFORM_SUNOS;
  1039.             }
  1040.             elseif( stripos($this->_agent, 'OS\/2') !== false ) {
  1041.                 $this->_platform = self::PLATFORM_OS2;
  1042.             }
  1043.             elseif( stripos($this->_agent, 'BeOS') !== false ) {
  1044.                 $this->_platform = self::PLATFORM_BEOS;
  1045.             }
  1046.             elseif( stripos($this->_agent, 'win') !== false ) {
  1047.                 $this->_platform = self::PLATFORM_WINDOWS;
  1048.             }
  1049.  
  1050.         }
  1051.     }
  1052. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement