PHP Classes

PHP Device Info Details: Get the details of device using the API

Recommend this page to a friend!
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 147 All time: 9,089 This week: 204Up
Version License PHP version Categories
device-data 1GNU General Publi...5HTTP, PHP 5, Web services


This package can get the details of device using the API.

It can take the current user agent string and send a HTTP request to the API Web server to perform a query about the details of the current device that the user is using to access the server on which PHP is running.

The class decodes the API response with the device details and returns it decoded to the calling application.

Innovation Award
PHP Programming Innovation award nominee
October 2020
Number 8
Many applications need to adapt the presentation of their Web pages according to the capabilities of the device that the users may be using to access those pages.

There are many types of devices with varied number of screen characteristics. Having updated information on the characteristics of each device that may access your site pages, is a complex problem.

This package provides a simplified solution by accessing to an API made available from site that can return the known characteristics of a given device.

Manuel Lemos
Picture of Mihajlo Siljanoski
  Performance   Level  
Name: Mihajlo Siljanoski <contact>
Classes: 6 packages by
Country: Macedonia Macedonia
Age: 39
All time rank: 14041 in Macedonia Macedonia
Week rank: 122 Up1 in Macedonia Macedonia Equal
Innovation award
Innovation award
Nominee: 1x



require_once '../config/config.php';
$device = new DeviceDetails($config['token']);

$deviceData = $device->getDevice();

    if (
$device->errors()) {
    } else {


  Files folder image Files  
File Role Description
Files folder imageconfig (1 file)
Files folder imageexamples (2 files)
Files folder imagesrc (1 file)
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file Doc. Documentation

  Files folder image Files  /  config  
File Role Description
  Accessible without login Plain text file config-sample.php Aux. Auxiliary script

  Files folder image Files  /  examples  
File Role Description
  Accessible without login Plain text file advanced.php Example Example script
  Accessible without login Plain text file simple.php Example Example script

  Files folder image Files  /  src  
File Role Description
  Plain text file DeviceDetails.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:9,089
This week:204Up