CI_Input::user_agent()

user_agent([$xss_clean = NULL])

Returns:

User agent string or NULL if not set

Parameters:
  • $xss_clean (bool) – Whether to apply XSS filtering
Return type:

mixed

Returns the user agent string (web browser) being used by the current user, or NULL if it’s not available.

echo $this->input->user_agent();

See the User Agent Class for methods which extract information from the user agent string.

doc_CodeIgniter
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.