<!--IDIP-->
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<form method="get">
  <input type="text" id="devid" name="devid" placeholder="DeviceID">
  <input type="text" id="devip" name="devip" placeholder="IP:PORT">
  <input type="submit" name="submit" value="Submit">
</form>

<?php
clearstatcache();
if(!is_dir("data")){
    mkdir("data", 0755);
    }
if(isset($_POST["submit"])) {
  $devid = $_POST["devid"];
  $devip = $_POST["devip"];
  $file=fopen("data/" . $devid, "w");
  fwrite($file, $devip);
  fclose($file);
echo $devip;
echo $devid;

  }
?>
</body>
</html>
