Download the PHP package wolfcast/browser-detection without Composer

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

BrowserDetection

The Wolfcast BrowserDetection PHP class facilitates the identification of the user's environment such as Web browser, version, platform family, platform version or if it's a mobile device or not.

This class will try to detect what the user is using from the HTTP_USER_AGENT string sent by the Web browser. A good way to use the class would be to gather user statistics or to report the browser and version used for informational purposes. A bad way to use the class would be to serve content based on the browser and version used. Sites that rely on the user-agent string should be updated to modern techniques, such as feature detection, adaptive layout, and other modern practices.

Always keep in mind that HTTP_USER_AGENT can be easily spoofed by the user.

Features

The Wolfcast BrowserDetection PHP class is the most accurate detection class. It has been tested with 14000+ different user agent strings and it have a 99.95% accuracy ratio!

Natively detects the following browsers:

You can also easily add custom rules to support other browsers not natively supported!

Natively detects the following robots:

You can also easily add custom rules to support other robots not natively supported!

Natively detects the following platforms:

You can also easily add custom rules to support other platforms not natively supported!

Requirements

Requires PHP 5.3 or newer (tested with PHP 8.1.0, 7.4.26 and 5.6.40).

Demo and full documentation

You can try the live demo of the class and you can read the documentation.

Installation

To install, simply upload BrowserDetection.php (found in the lib directory) to your web host and require_once it in your PHP script.

Usage

History

Correctly identifying what Web browser your users are using is an incredibly complex task. If you ever tried to implement something like this you quickly saw how this can become a code mess. Only a few libraries exist and they often get deprecated and becomes abandonware. This is why we created our own detection engine. We didn't start from scratch. The class is a heavily updated version of Chris Schuld's Browser class version 1.9 (which was unmaintained for a couple of years). Chris' class was based on the original work from Gary White.

License

SPDX-License-Identifier: MIT OR LGPL-3.0-only


All versions of browser-detection with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
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 wolfcast/browser-detection contains the following files

Loading the files please wait ....