Download the PHP package ua-parser/uap-php without Composer

On this page you can find all versions of the php package ua-parser/uap-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package uap-php

ua-parser PHP Library

Gitter Build Status Average time to resolve an issue Percentage of issues still open Latest Stable Version Total Downloads License

This is the PHP library for the uap-core project.

Installation

Add ua-parser/uap-php to the require section of your composer.json file and run composer update.

Usage

Straightforward:

Using Your Own Custom regexes.php File

You can use your own regexes.php file if you've customized the official file. I strongly encourage you to push back any changes you may have so others can benefit. That said, to use your own do the following:

Using ua-parser PHP Library from the Command Line

A command line utility is now included with the PHP library. The following commands are supported:

Get Usage Info

Provides simple usage information:

php bin/uaparser

Update the regexes.php File

Fetches an updated YAML file for ua-parser and overwrites the current regexes.php file. You can use the following as part of a cron job that runs nightly.

php bin/uaparser ua-parser:update [--no-backup]

By default creates a backup file. Use --no-backup to turn that feature off.

Convert an Existing regexes.yaml File to regexes.php

With the change to v2.0 you may have an existing and customized YAML file for ua-parser. Use the following to convert it to JSON.

php bin/uaparser ua-parser:convert [file]

Grab Just the Latest regexes.yaml File From the Repository

If you need to add a new UA it's easier to edit the original YAML and then convert it to JSON.

php bin/uaparser ua-parser:fetch [file]

Fetches an updated YAML file. Warning: This method overwrites any existing regexes.yaml file.

Parse a Single User Agent String

Parses a user agent string and dumps the results as a list.

php bin/uaparser ua-parser:parse "your user agent string"

Parse a Webserver Log File

Parses the supplied log file or log directory to test ua-parser. Saves the UA to a file when the UA or OS family aren't recognized or when the UA is listed as a generic smartphone or as a generic feature phone.

php bin/uaparser ua-parser:logfile [-f /path/to/logfile] [-d /path/to/logdir] [--include "*.gz"] [--exclude "*.gz"] errors.log

Multiple --include and --exclude parameters are allowed.

Credits

Thanks to the original ua-parser team for making the YAML file available for others to build upon.

Also, many thanks to the following major contributors to the PHP library:

Licensing


All versions of uap-php with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2 || ^8.0
composer/ca-bundle Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ua-parser/uap-php contains the following files

Loading the files please wait ....