PHPackages                             foroco/php-browser-detection - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. foroco/php-browser-detection

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

foroco/php-browser-detection
============================

Ultra fast PHP library to detect browser, OS, platform and device type by User-Agent parsing

v2.8(1y ago)1554.7M—6.4%35[3 issues](https://github.com/foroco/php-browser-detection/issues)7MITPHPPHP &gt;=5.3.0

Since Mar 23Pushed 1y ago13 watchersCompare

[ Source](https://github.com/foroco/php-browser-detection)[ Packagist](https://packagist.org/packages/foroco/php-browser-detection)[ Docs](https://github.com/foroco/php-browser-detection)[ RSS](/packages/foroco-php-browser-detection/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)DependenciesVersions (9)Used By (7)

PHP Browser Detection
=====================

[](#php-browser-detection)

A PHP library for detecting the browser, operating system (OS), platform, and device type through User-Agent parsing, designed with a focus on high performance and minimal memory usage during HTTP client parsing.
It uses a simple yet fast algorithm to accurately identify over 200 browsers/apps and more than 60 OS.
Parsing the most common browsers takes less than 0.0005 seconds, even on low-end shared hosting environments. For rare User-Agents, recognition times are under 0.0008 seconds in the same hosting conditions.
The library is exclusively tailored for current browsers and OS, omitting support for outdated environments that are no longer in use.
The library operates using a single file and does not rely on any third-party dependencies.

Requirements
------------

[](#requirements)

This library requires PHP 5.3 or later.

Manual installation
-------------------

[](#manual-installation)

1. Simply upload the library file `BrowserDetection.php` (located in the `src` directory) to your project;
2. Include the PHP library file using `require_once`:

```
