Skip to content
This repository has been archived by the owner on Aug 29, 2022. It is now read-only.

mikeevstropov/user-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mikeevstropov/user-agent

The library provides a user agent string

Installation

Add dependency mikeevstropov/user-agent

$ composer require mikeevstropov/user-agent

Usage

<?php

use Mikeevstropov\UserAgent\UserAgent;

// Getting of a desktop user agent
$desktopUserAgent = UserAgent::getDesktopRand();

gettype($desktopUserAgent); // string

// Getting of a mobile user agent
$mobileUserAgent = UserAgent::getMobileRand();

gettype($mobileUserAgent); // string

Api Interface

  • getDesktopRand

    Get a random desktop user agent

    Returns:

    • string
  • getMobileRand

    Get a random mobile user agent

    Returns:

    • string

Development

Clone

$ git clone https://github.com/mikeevstropov/user-agent

Go to project

$ cd user-agent

Install dependencies

$ composer install

Run the tests

$ composer test

License

MIT

About

The library provides a user agent string

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages