Browser::checkBrowserGoogleBot PHP Method

checkBrowserGoogleBot() protected method

Determine if the browser is the GoogleBot or not (last updated 1.7)
protected checkBrowserGoogleBot ( ) : boolean
return boolean True if the browser is the GoogletBot otherwise false
    protected function checkBrowserGoogleBot()
    {
        if (stripos($this->_agent, 'googlebot') !== false) {
            $aresult = explode('/', stristr($this->_agent, 'googlebot'));
            if (isset($aresult[1])) {
                $aversion = explode(' ', $aresult[1]);
                $this->setVersion(str_replace(';', '', $aversion[0]));
                $this->_browser_name = self::BROWSER_GOOGLEBOT;
                $this->setRobot(true);
                return true;
            }
        }
        return false;
    }