Commit realizado el 12:13:52 08-04-2024

This commit is contained in:
Pagina Web Monito
2024-04-08 12:13:55 -04:00
commit 0c33094de9
7815 changed files with 1365694 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
<?php
use donatj\UserAgent\UserAgentParser;
// if you're using composer
require __DIR__ . '/../vendor/autoload.php';
$parser = new UserAgentParser();
// object-oriented call
$ua = $parser->parse();
// or
// command style invocation
$ua = $parser();
echo $ua->platform() . PHP_EOL;
echo $ua->browser() . PHP_EOL;
echo $ua->browserVersion() . PHP_EOL;

View File

@@ -0,0 +1,14 @@
<?php
// if you're using composer
require __DIR__ . '/../vendor/autoload.php';
// v0 style global function - @deprecated
$uaInfo = parse_user_agent();
// or
// modern namespaced function
$uaInfo = donatj\UserAgent\parse_user_agent();
echo $uaInfo[donatj\UserAgent\PLATFORM] . PHP_EOL;
echo $uaInfo[donatj\UserAgent\BROWSER] . PHP_EOL;
echo $uaInfo[donatj\UserAgent\BROWSER_VERSION] . PHP_EOL;