protected function getUserAgent() { if (isset($_SERVER['HTTP_USER_AGENT'])) { return $_SERVER['HTTP_USER_AGENT']; } return null; }