27 lines
402 B
PHP
27 lines
402 B
PHP
|
<?php
|
||
|
|
||
|
$f = fopen("/tmp/mapid.fifo", "w+");
|
||
|
|
||
|
switch ($_POST["cmd"]) {
|
||
|
case "getty":
|
||
|
fwrite($f, "GETTY");
|
||
|
break;
|
||
|
case "cls":
|
||
|
fwrite($f, "CLS");
|
||
|
break;
|
||
|
case "line":
|
||
|
fwrite($f, "LINE ");
|
||
|
fwrite($f, $_POST["line"]);
|
||
|
break;
|
||
|
case "echo":
|
||
|
fwrite($f, "ECHO ");
|
||
|
fwrite($f, $_POST["text"]);
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
fwrite($f, "\n");
|
||
|
fclose($f);
|
||
|
|
||
|
//header("Refresh: 5; url=./");
|
||
|
header("Location: ./");
|