https://github.com/mimmi20/browscap-unsorted
https://github.com/mimmi20/browscap-unsorted
php71 php72
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mimmi20/browscap-unsorted
- Owner: mimmi20
- License: mit
- Archived: true
- Created: 2017-12-18T16:05:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-01-27T13:05:42.000Z (over 5 years ago)
- Last Synced: 2024-12-17T01:12:04.577Z (6 months ago)
- Topics: php71, php72
- Language: PHP
- Size: 72.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Browser Capabilities PHP Project
================================This is a userland replacement for PHP's native `get_browser()` function, which is _officially supported_ by the Browser Capabilities Project.
Forked from https://github.com/GaretJax/phpbrowscap.
[](http://travis-ci.org/browsecap/browscap-php) [](https://scrutinizer-ci.com/g/browscap/browscap-php/) [](https://scrutinizer-ci.com/g/browscap/browscap-php/)
Installation
------------Run the command below to install via Composer
```shell
composer require browscap/browscap-php
```Then you may identify the current user agent like so:
```php
use phpbrowscap\Browscap;$browscap = new Browscap();
$info = $browscap->getBrowser();
```Recommended Setup
-----------------It is highly recommended that you disable the auto update functionality, and create a background cron script to perform the update. This way, you do not make another request every time. So your usual usage would look like this:
```php
use phpbrowscap\Browscap;$browscap = new Browscap($cacheDir);
$browscap->doAutoUpdate = false;
$info = $browscap->getBrowser();
```And you could write a cron script such as this, to run once a day:
```php
use phpbrowscap\Browscap;$browscap = new Browscap($cacheDir);
$browscap->updateCache();
```Issues and feature requests
---------------------------Please report your issues and ask for new features on the GitHub Issue Tracker
at https://github.com/browscap/browscap-php/issuesPlease report incorrectly identified User Agents and browser detect in the browscap.ini
file here: https://github.com/browscap/browscap/issues