remove files
This commit is contained in:
parent
9ead795427
commit
4dd7cc6aca
2 changed files with 0 additions and 40 deletions
16
index.html
16
index.html
|
@ -1,16 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="de">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<title>Schreib auf das DFI</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<form action="send.php" method="post">
|
|
||||||
<textarea style="width: 400px; height: 65px;" name="text" cols="21" rows="4"></textarea><br>
|
|
||||||
<button type="submit" name="action" value="0">Send</button>
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
24
send.php
24
send.php
|
@ -1,24 +0,0 @@
|
||||||
<?php
|
|
||||||
include "mqtt.php";
|
|
||||||
|
|
||||||
$mqtt = new phpMQTT("192.168.88.243", 1883, "dynPHPClient");
|
|
||||||
|
|
||||||
|
|
||||||
if ($mqtt->connect(true, NULL, NULL, NULL))
|
|
||||||
{
|
|
||||||
$zeilen = explode("\n", $_REQUEST['text']);
|
|
||||||
|
|
||||||
$aktuelleZeile = 1;
|
|
||||||
foreach ($zeilen as $zeile)
|
|
||||||
{
|
|
||||||
if($aktuelleZeile <= 4)
|
|
||||||
$mqtt->publish("/unhb/dfi/".$aktuelleZeile++, $zeile, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
$mqtt->close();
|
|
||||||
} else {
|
|
||||||
echo "Time out!\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
include "index.html";
|
|
||||||
?>
|
|
Loading…
Reference in a new issue