ikimea/browser

Detecting the user’s browser

1.15.1 2018-11-29 17:06 UTC

This package is auto-updated.

Last update: 2024-03-29 02:15:34 UTC


README

Detecting the user’s browser type and version is helpful in web applications that harness some of the newer bleeding edge concepts.

Requirements

Brower works with PHP 5.3.3 or later.

Installation

1. Add the bundle to your composer.json

"require": {
    ...
    "ikimea/browser": "dev-master"
}

2. Install the bundle using composer

$ php composer.phar update ikimea/browser

Usage

<?php

use Ikimea\Browser\Browser;

$browser = new Browser();
if( $browser->getBrowser() == Browser::BROWSER_FIREFOX && $browser->getVersion() >= 2 ) {
   	echo 'You have FireFox version 2 or greater';
}