<?php
require_once('../src/BrowserDetection.php');
$Browser = new foroco\BrowserDetection();
// Testing some new User-Agent strings
$useragent[] = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 12_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36';
$useragent[] = 'Mozilla/5.0 (Windows NT 10.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36';
$useragent[] = 'Mozilla/5.0 (Windows NT 11.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36';
$time_start = microtime(true);
foreach ($useragent as $u)
{
// Detect all possible environment data from User-Agents
$result = $Browser->getAll($u);
echo '<div style="font-size:16px; font-weight:bold"><pre>';
echo $u;
echo '</pre></div>';
echo '<div style="font-size:18px; font-weight:bold"><pre>';
print_r($result);
echo '</pre></div>';
echo '<div style="font-size:16px; font-weight:bold"><pre>';
echo '--------------------------------------------------------------------------------';
echo '</pre></div>';
}
$time_end = microtime(true);
$time_result = $time_end - $time_start;
echo '<p style="font-size:21px">Total execution time: '.substr($time_result,0,7).' sec.</p>';
?>
|