ikimea/browser

Detecting the user’s browser

Installs: 42 634

Dependents: 11

Stars: 17

Watchers: 1

Forks: 5

Open Issues: 3

Language: PHP

1.11 2014-09-25 12:43 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';
}