PHP code example of fyre / useragent

1. Go to this page and download the library: Download fyre/useragent library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fyre / useragent example snippets


use Fyre\Http\UserAgent;

$userAgent = new UserAgent($agent);

$userAgent = UserAgent::fromString($agent);

$agent = $userAgent->getAgentString();

$browser = $userAgent->getBrowser();

$mobile = $userAgent->getMobile();

$platform = $userAgent->getPlatform();

$robot = $userAgent->getRobot();

$version = $userAgent->getVersion();

$isBrowser = $userAgent->isBrowser();

$isMobile = $userAgent->isMobile();

$isRobot = $userAgent->isRobot();