loadDevList.php 337 B

123456789101112
  1. <?php
  2. include_once("../auth.php");
  3. $result = [];
  4. if (file_exists("iptable.txt")){
  5. $ips = file_get_contents("iptable.txt");
  6. //There are an extra "," at the end of the iptable generated. That has to be poped away
  7. $result = explode(",",$ips);
  8. array_pop($result);
  9. }
  10. header('Content-Type: application/json');
  11. echo json_encode($result);
  12. ?>