Easy Tutorial
❮ Func Date Timezone Location Get Func Cal Cal Info ❯

PHP get_browser() Function

PHP Misc Reference Manual

Example

Retrieve the user's browscap.ini file and return the capabilities of the user's browser:


Definition and Usage

The get_browser() function retrieves the user's browscap.ini file and returns the capabilities of the user's browser.


Syntax

Parameter Description
user_agent Optional. Specifies the name of the HTTP user agent. Default is the value of $HTTP_USER_AGENT. You can set it to NULL to bypass this parameter.
return_array Optional. If this parameter is set to TRUE, this function will return an array instead of an object.

Technical Details

Return Value: If successful, this function returns an object or an array containing information about the user's browser. If it fails, it returns FALSE.
PHP Version: 4+
--- ---
Changelog: The return_array parameter was added in PHP 4.3.2.
--- ---

❮ Func Date Timezone Location Get Func Cal Cal Info ❯