PHP Classes

File: examples/advanced.php

Recommend this page to a friend!
  Classes of Mihajlo Siljanoski   PHP Device Info Details   examples/advanced.php   Download  
File: examples/advanced.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Device Info Details
Get the details of device using the php.mk API
Author: By
Last change:
Date: 4 years ago
Size: 476 bytes
 

Contents

Class file image Download
<?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);
    }

?>