release 0.1

This commit is contained in:
telegnom
2015-03-22 19:31:59 +01:00
parent 1524274303
commit ff86390bfe
9 changed files with 93 additions and 75 deletions

14
server/get.php Normal file
View File

@ -0,0 +1,14 @@
<?php
if (preg_match("/^[0-9]{10}\.[0-9]{0,2};[0-9]{1,5}\.[0-9]{0,20}$/", $_POST['val'])) {
$val = explode(";", $_POST['val']);
$updator = new RRDUpdater("power.rrd");
$updator->update(array("power" => $val[1]), $val[0]);
$fileh = fopen("power.log", "w+");
fwrite($fileh, $_POST['val']);
fclose($fileh);
echo "0";
} else {
echo "1";
}
?>