1. Go to this page and download the library: Download ubxty/ubx-ua-parser 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/ */
ubxty / ubx-ua-parser example snippets
use Ubxty\UAParser\Facades\UAParser;
// Get platform
$platform = UAParser::getPlatform(); // android, ios, web, etc.
// Get browser
$browser = UAParser::getBrowser(); // chrome, firefox, in-app, etc.
// Detect bots
$isBot = UAParser::isBot();
// Get original UA string
$ua = UAParser::getOriginalUserAgent();
// Get device type
$device = UAParser::getDeviceType(); // phone, tablet, desktop, etc.