Parse User Agent
Function: parseUserAgent
Visibility: public static
Parameter: parseUserAgent($userAgent)
Description:
Parse user agent data from visitors that visit pages. This function will call: parseBots and parseMobile. The output will contain details about the user visit, such as: bot identification, mobile detector, browser ver, and operation system ver. If no string entered,
$_SERVER['HTTP_USER_AGENT']
will be created.
Parameters:
(optional) - string - userAgent - The user agent string.
Return:
array - The user agent information orgenized by: bot,mobile,platform,platformVer,browser,browserVer.
Callable from (extended classes):
application: controller,view
advanced: controller,view
operators: controller,view
api: controller,view
example: 1
We want to get categorized info from the user agent string.
How to call (example):
Possible outcome (example):
Output: