Browser::isRobot PHP Method

isRobot() public method

Is the browser from a robot (ex Slurp,GoogleBot)?
public isRobot ( ) : boolean
return boolean True if the browser is from a robot otherwise false
    public function isRobot()
    {
        return $this->_is_robot;
    }

Usage Example

Beispiel #1
0
 /**
  * Returns the name of the browser with the given user agent.
  * 
  * @param	string		$userAgent
  * @return	string
  */
 public static function getBrowser($userAgent = '')
 {
     require_once CMS_DIR . 'lib/util/Browser.php';
     $browser = new \Browser($userAgent);
     if (!$browser->isRobot()) {
         return $browser->getBrowser();
     }
     return 'unknown';
 }
All Usage Examples Of Browser::isRobot