コード例 #1
0
ファイル: gateway.php プロジェクト: bhacas/shBackend
<?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
ファイル: chartData.php プロジェクト: bhacas/shBackend
<?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();