function visitors_get_browscap_data in Visitors 7.2
Retrieve capabilities of the browser for $user_agent.
Parameters
user_agent: A string containing the User Agent to be analyzed.
Return value
array browser capabilities data array.
1 call to visitors_get_browscap_data()
- visitors_browscap_save_user_agent in ./
visitors.exit.inc - Store user agent info to visitors_browscap table.
File
- ./
visitors.exit.inc, line 178 - Implements hook_exit().
Code
function visitors_get_browscap_data($user_agent) {
$result = get_browser($user_agent);
return array(
'user_agent' => $user_agent,
'browser_name_regex' => utf8_encode($result->browser_name_regex),
'browser_name_pattern' => $result->browser_name_pattern,
'parent' => isset($result->parent) ? $result->parent : '',
'platform' => $result->platform,
'win32' => $result->win32,
'comment' => $result->comment,
'browser' => $result->browser,
'version' => $result->version,
'majorver' => $result->majorver,
'minorver' => $result->minorver,
'frames' => $result->frames == '' ? NULL : $result->frames,
'iframes' => $result->iframes == '' ? NULL : $result->iframes,
'tables' => $result->tables == '' ? NULL : $result->tables,
'cookies' => $result->cookies == '' ? NULL : $result->cookies,
'javascript' => $result->javascript == '' ? NULL : $result->javascript,
'javaapplets' => $result->javaapplets == '' ? NULL : $result->javaapplets,
'cssversion' => $result->cssversion,
'renderingengine_name' => $result->renderingengine_name,
'renderingengine_description' => $result->renderingengine_description,
'platform_version' => $result->platform_version,
'platform_description' => $result->platform_description,
'alpha' => $result->alpha,
'beta' => $result->beta,
'win16' => $result->win16,
'win64' => $result->win64,
'backgroundsounds' => $result->backgroundsounds,
'vbscript' => $result->vbscript,
'activexcontrols' => $result->activexcontrols,
'ismobiledevice' => $result->ismobiledevice,
'issyndicationreader' => $result->issyndicationreader,
'crawler' => $result->crawler == '' ? NULL : $result->crawler,
'aolversion' => $result->aolversion,
'device_name' => $result->device_name,
'device_maker' => $result->device_maker,
'renderingengine_version' => $result->renderingengine_version,
);
}