Download the PHP package phpmk/devicedata without Composer
On this page you can find all versions of the php package phpmk/devicedata. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download phpmk/devicedata
More information about phpmk/devicedata
Files in phpmk/devicedata
Download phpmk/devicedata
More information about phpmk/devicedata
Files in phpmk/devicedata
Vendor phpmk
Package devicedata
Short Description PHP.mk PHP Library for using Device API service
License GPL-3.0-or-later
Homepage https://php.mk/
Package devicedata
Short Description PHP.mk PHP Library for using Device API service
License GPL-3.0-or-later
Homepage https://php.mk/
Please rate this library. Is it a good library?
Informations about the package devicedata
DeviceDetails PHP library for visitors devices
With this library, you can very easily detect device details. Especially for mobile and tablet.
#### Composer installation composer require phpmk/devicedata:v1
Configuration:
./config/config-sample.php
<?php //rename file to config.php $config['token'] = '[your PHP.mk token]'; //You can get free token on https://php.mk/services/device ?>
How to use:
./examples/simple.php
<?php require_once '../config/config.php'; require_once '../src/DeviceDetails.php'; $device = new DeviceDetails($config['token']); $deviceData = $device->getDevice(); if ($device->errors()) { print_r($device->errors()); } else { print_r($deviceData); } ?>
./examples/advanced.php
<?php require_once '../config/config.php'; require_once '../src/DeviceDetails.php'; $device = new DeviceDetails($config['token']); $device->setUserAgent('Mozilla/5.0 (Linux; Android 4.4.2; GT-P5210 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.109 Safari/537.36'); $deviceData = $device->getDevice(); if ($device->errors()) { print_r($device->errors()); } else { print_r($deviceData); } ?>
Public methods:
DeviceDetails :: __construct/** * Initialize class object * * @param array $token Token for web service * * @return object|null Return instance of the class or null if missing token **/
DeviceDetails :: setUserAgent
/** * Manually set UserAgent * * @param string $userAgent Browser UserAgent * * @return void **/
DeviceDetails :: getDevice
/** * Get Device data * * @return mixed Return everything about device **/
DeviceDetails :: errors
/** * Get errors from service * * @return array Return service errors **/
All versions of devicedata with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.6.0
ext-curl Version *
ext-json Version *
ext-mbstring Version *
ext-curl Version *
ext-json Version *
ext-mbstring Version *
The package phpmk/devicedata contains the following files
Loading the files please wait ....