Download the PHP package nodes/browscap without Composer

On this page you can find all versions of the php package nodes/browscap. 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 browscap

Browser Capabilities PHP Project

This is a userland replacement for PHP's native get_browser() function, which is officially supported by the Browser Capabilities Project.

Note that you are currently viewing the unstable master branch (will be 3.x versions). If you're installing via composer require browscap/browscap-php, depending on your minimum stability, you may be using the latest version 2.x, so please read the documentation for that branch here.

Build Status Code Coverage Scrutinizer Quality Score

Installation

Run the command below to install via Composer

Then you may identify the current user agent like so:

Recommended Setup

Before you can start, you have to download the browscap.ini file and convert it into a cache. There are two ways.

  1. Download the file and convert it in two steps. The downloaded file will be stored in a local file, but there is no check if the remote file has changed. If your cache gets corrupted you only need to rerun the convert command.

  2. Download the file and convert it in one step. The downloaded file will not be stored in a local file, but there is a check if the remote file has changed. If your cache gets corrupted you have clean the cache and restart the process.

If you only want to check if a new version of the browscap.ini is available, you can use the browscap:check-update command.

Note: Both ways to create/update the cache and also checking the update will use the standard mode file as default. If you want more detailed information you may change this with the remote-file option. Please use the help function this parameter.

Each operation expect fetch uses a cache inside the resources directory inside the project. If you update this library with composer, the cache is cleared also. If you want to avoid this and want to set your own cache folder, you can use the cache option. If you do this, you have to set a Cache Instance for this this path (see below).

Note: Each operation (fetch, update, check-update) which fetches data from the remote host browscap.org may run into the rate limit of that site. If this happens an Exception is thrown.

A sample using composer with taking the useragent from the global $_SERVER variable.

If you have an user agent you can change the function

If you want to log something that happens with the detector you may set an logger. This logger has to implement the logger interface from Psr\Log\LoggerInterface

If you want to use an other cache than the file cache, you may set a different one. You have to change the cache adapter before building the cache with the convert or the update commands.

NOTE: If you want to use a different cache, the samples above will not work, because they are using a predefined file cache

This cache adapter has to implement the adapter interface from WurflCache\Adapter\AdapterInterface

In this sample a memcache is used to store the full version of the bropwscap.ini file

If you are behind a proxy you have to set a configuration with the proxy data. Parts who are not needed for your connection (like the port if the standard port is used) dont need to be set

Issues and feature requests

Please report your issues and ask for new features on the GitHub Issue Tracker at https://github.com/browscap/browscap-php/issues

Please report incorrectly identified User Agents and browser detect in the browscap.ini file here: https://github.com/browscap/browscap/issues


All versions of browscap with dependencies

PHP Build Version
Package Version
Requires php Version ^5.6|^7.0
mimmi20/wurflcache Version ^1.3
mimmi20/file-loader Version ^2.0
symfony/filesystem Version ^2.6|^3.0
symfony/finder Version ^2.6|^3.0
symfony/console Version ^2.6|^3.0
monolog/monolog Version ^1.7
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 nodes/browscap contains the following files

Loading the files please wait ....