Info Panel
Roll it!   ⇔
1 - Documantation
* Knowledge Base
  • Mvc
  • Application
  • Advanced
  • Operators
  • Api
* Origin Template
  • Customize
* Core Classes
* Classes

* all grey titles exists but not documented yet

Parse Bots

Type: function

Class: UserAgent

Platform: 2v

Function: parseBots

Visibility: public static

Parameter: parseBots($userAgent)

Description:
Robots are crawling all over the internet, we can detect them with this simple function and then we can distinguish them from the real users (notice: not all bots can be detected). It search for bot strings out of user agent data, based on predefined data entered on: botNames.
Parameters:
(required) - string - userAgent - The user agent string.
Return:
array|false - The bot name found. If not will return false.
Callable from (extended classes):
application: controller,view
advanced: controller,view
operators: controller,view
api: controller,view
example: 1
We want to get name of the bot (if any) from the user agent string.
How to call (example):
Code:
Possible outcome (example):
Output:
Info Panel
Roll it!   ⇔