Skip to content
Snippets Groups Projects
Commit e442d580 authored by philipp's avatar philipp
Browse files

Auf test-status gebracht, ajax.php läuft shcon

parent 220a5eba
No related branches found
No related tags found
No related merge requests found
<?
phpinfo();
?>
<?php
require_once 'widgets/widgetInterface.php';
class ZoneOffen implements widgetInterface
{
public function giveOutput()
{
$widgetOutput = "Test";
return $widgetOutput;
}
}
?>
<?php
$httpRequest = new HttpRequest('http://zone.warpzone.ms:8000/ecmd?io%20get%20pin%200', HttpRequest::METH_GET);
$httpRequest->send();
if ( trim($httpRequest->getResponseBody()) == "port 0: 0x00") {
$tuerOffen = true;
} else {
$tuerOffen = false;
}
$httpRequest = new HttpRequest('http://zone.warpzone.ms:8000/ecmd?1w%20get%20103fcdf9010800c3', HttpRequest::METH_GET);
$httpRequest->send();
$tempLounge = trim($httpRequest->getResponseBody());
$httpRequest = new HttpRequest('http://zone.warpzone.ms:8000/ecmd?1w%20get%2010e3e2f9010800ed', HttpRequest::METH_GET);
$httpRequest->send();
$tempWerkstatt = trim($httpRequest->getResponseBody());
$antwortArray["tuerOffen"] = $tuerOffen;
$antwortArray["tempLounge"] = floatval($tempLounge);
$antwortArray["tempWerkstatt"] = floatval($tempWerkstatt);
print(json_encode($antwortArray));
?>
<?php
interface widget
{
public function giveOutput();
}
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment