forked from jesusperiago/fonoapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.php
24 lines (18 loc) · 848 Bytes
/
demo.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
include_once("fonoapi-v1.php");
$apiKey = "xxxxxxxx"; // get your token key here - https://fonoapi.freshpixl.com
$fonoapi = fonoApi::init($apiKey);
try {
$res = $fonoapi::getDevice("i9305"); // the device you need to get details here
foreach ($res as $mobile) {
if (!empty($mobile->DeviceName)) echo "Device : ". $mobile->DeviceName . "<br>";
if (!empty($mobile->Brand)) echo "Brand : ". $mobile->Brand . "<br>";
if (!empty($mobile->cpu)) echo "Cpu : " . $mobile->cpu . "<br>";
if (!empty($mobile->status)) echo "Status : " . $mobile->status . "<br>";
if (!empty($mobile->dimensions)) echo "Dimensions : " . $mobile->dimensions . "<br>";
if (!empty($mobile->_4g_bands)) echo "4g : " .$mobile->_4g_bands . "<br>";
}
} catch (Exception $e) {
echo "ERROR : " . $e->getMessage();
}
?>