Name

get_browser

Synopsis

mixed get_browser([string name[, bool return_array ]])

Returns an object containing information about the user’s current browser, as found in $HTTP_USER_AGENT, or the browser identified by the user agent name. The information is gleaned from the browscap.ini file. The version of the browser and various capabilities of the browser, such as whether or not the browser supports frames, cookies, and so on, are returned in the object. If return_array is true, an array will be returned rather than an object.

Get Programming PHP, 3rd Edition 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.