php-extended/php-user-agent-provider-basic

A very basic user agent provider

7.0.10 2024-12-22 02:25 UTC

README

A very basic user agent provider

coverage build status

This library is updated once a week, every sunday.

Last Updated Date : 2024-12-22

Installation

The installation of this library is made via composer and the autoloading of all classes of this library is made through their autoloader.

  • Download composer.phar from their website.
  • Then run the following command to install this library as dependency :
  • php composer.phar php-extended/php-user-agent-provider-basic ^7

Basic Usage

This library is to provide a standard and updated user agent that may be used in headers to http queries.


use PhpExtended\UserAgent\BasicUserAgentProvider;

$provider = new BasicUserAgentProvider();
$userAgent = $provider->getNextUserAgent();
echo $userAgent->__toString(); // Mozilla/5.0 ...

License

MIT (See license file).