protected function checkBrowserNetscape()
    {
        //BlackBerry & Nokia UAs can conflict with Netscape UAs
        if ($this->containString($this->_agent, array('BlackBerry', 'Nokia'), true, false)) {
            return false;
        }

        //Netscape v6 to v9 check
        if ($this->checkSimpleBrowserUA(array('Netscape', 'Navigator', 'Netscape6'), $this->_agent, self::BROWSER_NETSCAPE)) {
            return true;
        }

        //Netscape v1-4 (v5 don't exists)
        $found = false;
        if ($this->containString($this->_agent, 'Mozilla') && !$this->containString($this->_agent, 'rv:', true, false)) {
            $version = '';
            $verParts = explode('/', stristr($this->_agent, 'Mozilla'));
            if (count($verParts) > 1) {
                $verParts = explode(' ', $verParts[1]);
                $verParts = explode('.', $verParts[0]);

                $majorVer = $this->parseInt($verParts[0]);
                if ($majorVer > 0 && $majorVer < 5) {
                    $version = implode('.', $verParts);
                    $found = true;

                    if (strtolower(substr($version, -4)) == '-sgi') {
                        $version = substr($version, 0, -4);
                    } else {
                        if (strtolower(substr($version, -4)) == 'gold') {
                            $version = substr($version, 0, -4) . ' Gold'; //Doubles spaces (if any) will be normalized by setVersion()
                        }
                    }
                }
            }
        }

        if ($found) {
            $this->setBrowser(self::BROWSER_NETSCAPE);
            $this->setVersion($version);
            $this->setMobile(false);
            $this->setRobot(false);
        }

        return $found;
    }
protected function checkBrowserNetscape()
    {
        //BlackBerry & Nokia UAs can conflict with Netscape UAs
        if ($this->containString($this->_agent, array('BlackBerry', 'Nokia'), true, false)) {
            return false;
        }

        //Netscape v6 to v9 check
        if ($this->checkSimpleBrowserUA(array('Netscape', 'Navigator', 'Netscape6'), $this->_agent, self::BROWSER_NETSCAPE)) {
            return true;
        }

        //Netscape v1-4 (v5 don't exists)
        $found = false;
        if ($this->containString($this->_agent, 'Mozilla') && !$this->containString($this->_agent, 'rv:', true, false)) {
            $version = '';
            $verParts = explode('/', stristr($this->_agent, 'Mozilla'));
            if (count($verParts) > 1) {
                $verParts = explode(' ', $verParts[1]);
                $verParts = explode('.', $verParts[0]);

                $majorVer = $this->parseInt($verParts[0]);
                if ($majorVer > 0 && $majorVer < 5) {
                    $version = implode('.', $verParts);
                    $found = true;

                    if (strtolower(substr($version, -4)) == '-sgi') {
                        $version = substr($version, 0, -4);
                    } else {
                        if (strtolower(substr($version, -4)) == 'gold') {
                            $version = substr($version, 0, -4) . ' Gold'; //Doubles spaces (if any) will be normalized by setVersion()
                        }
                    }
                }
            }
        }

        if ($found) {
            $this->setBrowser(self::BROWSER_NETSCAPE);
            $this->setVersion($version);
            $this->setMobile(false);
            $this->setRobot(false);
        }

        return $found;
    }
protected function checkBrowserNetscape ( ) { //BlackBerry & Nokia UAs can conflict with Netscape UAs if ( $ this -> containString ( $ this -> _agent , array ( 'BlackBerry' , 'Nokia' ) , true , false ) ) { return false ; } //Netscape v6 to v9 check if ( $ this -> checkSimpleBrowserUA ( array ( 'Netscape' , 'Navigator' , 'Netscape6' ) , $ this -> _agent , self :: BROWSER_NETSCAPE ) ) { return true ; } //Netscape v1-4 (v5 don't exists) $ found = false ; if ( $ this -> containString ( $ this -> _agent , 'Mozilla' ) && ! $ this -> containString ( $ this -> _agent , 'rv:' , true , false ) ) { $ version = '' ; $ verParts = explode ( '/' , stristr ( $ this -> _agent , 'Mozilla' ) ) ; if ( count ( $ verParts ) > 1 ) { $ verParts = explode ( ' ' , $ verParts [ 1 ] ) ; $ verParts = explode ( '.' , $ verParts [ 0 ] ) ; $ majorVer = $ this -> parseInt ( $ verParts [ 0 ] ) ; if ( $ majorVer > 0 && $ majorVer < 5 ) { $ version = implode ( '.' , $ verParts ) ; $ found = true ; if ( strtolower ( substr ( $ version , - 4 ) ) == '-sgi' ) { $ version = substr ( $ version , 0 , - 4 ) ; } else { if ( strtolower ( substr ( $ version , - 4 ) ) == 'gold' ) { $ version = substr ( $ version , 0 , - 4 ) . ' Gold' ; //Doubles spaces (if any) will be normalized by setVersion() } } } } } if ( $ found ) { $ this -> setBrowser ( self :: BROWSER_NETSCAPE ) ; $ this -> setVersion ( $ version ) ; $ this -> setMobile ( false ) ; $ this -> setRobot ( false ) ; } return $ found ; }
Determine if the browser is Netscape or not. Official support for this browser ended on March 1st, 2008.
@access protected
@link http://en.wikipedia.org/wiki/Netscape
@return boolean Returns true if the browser is Netscape, false otherwise.
Determine if the browser is Netscape or not . Official support for this browser ended on March 1st 2008 .