get_browser

mixed get_browser(string [user_agent]) 

Gets information on a browser’s features.

Returns:

Object containing the browser’s properties; FALSE on error

Description:

get_browser() is used to match an HTTP UserAgent header to an entry in a browscap.ini file. browscap.ini files contain information on browser capabilities, such as whether they support JavaScript, whether they have the ability to display frames, and so on.

The optional user_agent argument allows developers to specify the HTTP user agent to use for the capabilities lookup. If no user_agent argument is specified, PHP uses the value of $HTTP_USER_AGENT for the user_agent argument.

The browser capability information is returned as an object containing a variable number of ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.