function visitors_browscap_save_user_agent in Visitors 7.2
Store user agent info to visitors_browscap table.
Parameters
user_agent: A string containing the User Agent to be analyzed.
1 call to visitors_browscap_save_user_agent()
- visitors_exit in ./
visitors.exit.inc - Implements hook_exit().
File
- ./
visitors.exit.inc, line 271 - Implements hook_exit().
Code
function visitors_browscap_save_user_agent($user_agent) {
if (module_exists('visitors_browscap') && !isset($_SESSION['visitors_browscap'][$user_agent]) && !visitors_browscap_check_is_user_agent_exist($user_agent)) {
$_SESSION['visitors_browscap'][$user_agent] = visitors_get_browscap_data($user_agent);
$browscap_data = $_SESSION['visitors_browscap'][$user_agent];
db_insert('visitors_browscap')
->fields($browscap_data)
->execute();
}
}