예제 #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();
예제 #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);
예제 #3
0
파일: get.php 프로젝트: bhacas/shBackend
<?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();