CI_User_agent::is_robot()

is_robot([$key = NULL])

Parameters:
  • $key (string) – Optional robot name
Returns:

TRUE if the user agent is a (specified) robot, FALSE if not

Return type:

bool

Returns TRUE/FALSE (boolean) if the user agent is a known robot.

Note

The user agent library only contains the most common robot definitions. It is not a complete list of bots. There are hundreds of them so searching for each one would not be very efficient. If you find that some bots that commonly visit your site are missing from the list you can add them to your application/config/user_agents.php file.

doc_CodeIgniter
2016-10-15 16:32:05
Comments
Leave a Comment

Please login to continue.