Ejemplo n.º 1
0
<?php

error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
require __DIR__ . '/../vendor/autoload.php';
$ip = $_SERVER['REMOTE_ADDR'];
if (apc_exists('device' . $ip)) {
    apc_delete('device' . $ip);
}
$test = Bh\ShBackend\Devices\DevicesManager::getInstance()->getDevice($ip);
Bh\ShBackend\Events\EventsManager::getInstance()->run();
Ejemplo n.º 2
0
<?php

error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
require __DIR__ . '/../vendor/autoload.php';
$ip = $_GET['ip'];
$event = $_GET['event'];
header('Content-type: Application/json');
echo Bh\ShBackend\Devices\DevicesManager::getInstance()->getDevice($ip)->getEvents($event);
Ejemplo n.º 3
0
<?php

error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
require __DIR__ . '/../vendor/autoload.php';
$ip = $_GET['ip'];
header('Content-type: Application/json');
echo Bh\ShBackend\Devices\DevicesManager::getInstance()->getDevice($ip)->getAsJson();