You are here

function visitors_get_user_agent in Visitors 8

Same name and namespace in other branches
  1. 7.2 visitors.exit.inc \visitors_get_user_agent()
  2. 7 visitors.exit.inc \visitors_get_user_agent()
  3. 7.0 visitors.exit.inc \visitors_get_user_agent()

Get visitor user agent.

Return value

string user agent, or empty string if user agent does not exist

1 call to visitors_get_user_agent()
visitors_exit in ./visitors.exit.inc
Implements of hook_exit().

File

./visitors.exit.inc, line 113
Implements of hook_exit().

Code

function visitors_get_user_agent() {
  return isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
}