API15

API15:JBrowser/isRobot

From Joomla! Documentation

Description

Determines if the browser is a robot or not.


<! removed transcluded page call, red link never existed >

Syntax

isRobot()


Returns

boolean True if browser is a known robot.

Defined in

libraries/joomla/environment/browser.php

Importing

jimport( 'joomla.environment.browser' );

Source Body

function isRobot()
{
     foreach ($this->_robots as $robot) {
         if (strpos($this->_agent, $robot) !== false) {
             return true;
        }
    }
    return false;
}


<! removed transcluded page call, red link never existed >

Examples

Code Examples