PHP code example of vchukh / ualibs

1. Go to this page and download the library: Download vchukh/ualibs 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/ */

    

vchukh / ualibs example snippets

 bash
$ php composer.phar install
 php


$ualibs = new UaLibs();

var_dump($ualibs->get()); // get all available user agents
var_dump($ualibs->getRandom()); // get random user-agent

var_dump($ualibs->getChrome()); // get all available Chrome user agents
var_dump($ualibs->getChromeRandom()); // get Chrome random user agent