How to detect browser using php

    To detect browser in php follow the steps:
    1. Download the class file Click Here
    2. Create Browser class object and call getBrowser() function.

    <?php
    include 'Browser.php';
    $getbrowser= new Browser();
    $browser_name = $getbrowser->getBrowser();
    $browser_version = $browser->getVersion();

    //You can use $browser_name and $browser_version in conditions to excute code in specific browsers
    ?>
    5
    Average: 5 (1 vote)