Cloud first on Composer, with a native extension when detection must stay on your server. new DeviceDetectionPipelineBuilder(['resourceKey' => $key]) sends each request's headers to the 51Degrees cloud service and returns the device properties your key covers.
On-premise, phpize builds the FiftyOneDegreesHashEngine extension from the shared C code and php.ini names the Device Detection data file. It loads once at PHP start-up, so Apache needs the prefork MPM. IP Intelligence has its own extension and cloud support. The cloud is the source of Human Confidence and Identifiers, fiftyone.pipeline.did reads and checks the 51Did, and fiftyone.geolocation turns latitude and longitude into an address.
composer require 51degrees/fiftyone.devicedetection
Code and issues: https://github.com/51Degrees/51degrees-php
Documentation: https://51degrees.com/documentation/index.html?utm_source=sourceforge&utm_medium=listing&utm_campaign=51degrees-php&utm_content=description&utm_term=docs
Features
- Cloud Device Detection from Packagist
- FiftyOneDegreesHashEngine extension for on-premise matching
- Data file and engine settings in php.ini
- IP Intelligence through the cloud or its own extension
- Human Confidence and Identifiers in the cloud service response
- FodId and DidClient for the 51Did
- Reverse geocoding in fiftyone.geolocation
- Packages declare EUPL-1.2
License
European Union Public LicenseFollow 51Degrees for PHP
User Reviews
-
1 out of 5 starsEasy to use, fast and accurate.
-
5 out of 5 starsThis service is fantastic. It's easy to use, reliable, powerful, feature-rich and developer-friendly. Copy the files, add the reference and bingo, you can detect the type of device accessing your site. Well done 51Degrees!