Download the PHP package 51degrees/fiftyone.devicedetection without Composer

On this page you can find all versions of the php package 51degrees/fiftyone.devicedetection. 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 fiftyone.devicedetection

51Degrees PHP Device Detection

51Degrees PHP Device Detection

Developer Documentation

Introduction

This project contains the source code for the PHP implementation of 51Degrees' cloud-based device detection engine for use with the Pipeline API.

Dependencies

The tested versions page shows the PHP versions that we currently test against. The software may run fine against other versions, but additional caution should be applied.

You will require a resource key to use the Cloud API. You can create resource keys using our configurator, see our documentation on how to use this.

Examples

To run the examples, you will need PHP and composer installed. Once these are available, install the dependencies required by the examples. Navigate to the repository root and execute:

This will create the vendor directory containing autoload.php.

Ensure the resource_key environment variable is set to your resource key prior to running the example scripts. Now navigate to the examples directory and start a PHP server with the relevant file. For example:

or to run in a terminal

This will start a local web server listening on port 3000. Open your web browser and browse to http://localhost:3000/ to see the example in action.

The table below describes the examples that are available.

Example Description
gettingStartedConsole How to use the 51Degrees Cloud service to determine details about a device based on its User-Agent and User-Agent Client Hints HTTP header values.
gettingStartedWeb How to use the 51Degrees Cloud service to determine details about a device as part of a simple ASP.NET website.
tacLookupConsole How to get device details from a TAC (Type Allocation Code) using the 51Degrees cloud service.
nativeModelLookupConsole How to get device details from a native model name using the 51Degrees cloud service.
metaDataConsole Demonstrates how to access meta-data relating to the properties that device detection can populate.
failureToMatch Demonstrates the functionality available when device detection is unable to identify the details of the device.
userAgentClientHints-Web Legacy example. Retained for the associated automated tests. See GettingStarted-Web instead.

Tests

This repo has tests for the examples. To run the tests, make sure PHPUnit is installed then, in the root of this repo, call:

On-premise device detection

The on-premise implementation of device detection is much faster but requires more memory and processing power than the cloud version. Unfortunately, distributing the on-premise package via composer would require the inclusion of binary executables (.so/.dll) that are not permitted. If you wish to use the on-premise version then you will need to clone the on-premise repository and follow the instructions in the readme to build the required modules. This is a fairly involved process so feel free to contact us if you are having difficulties.

Development

When making changes to this repository, it may be necessary to link to a local development version of pipeline dependencies. For information on this, see Composer local path.

For exmaple, if a development version of 51degrees/fiftyone.pipeline.core was stored locally, the location would be added with:

then the dependency changed to:


All versions of fiftyone.devicedetection with dependencies

PHP Build Version
Package Version
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 51degrees/fiftyone.devicedetection contains the following files

Loading the files please wait ....