Add files via upload

This commit is contained in:
LoveesYe
2022-07-14 20:58:16 +02:00
committed by GitHub
parent 6aa2b4339a
commit 5b8d2f9c5d
5 changed files with 265 additions and 0 deletions

16
web/api.php Normal file
View File

@@ -0,0 +1,16 @@
<?php
error_reporting(0);
header('Content-Type: application/json; charset=UTF-8');
include 'monitor.php';
$post = file_get_contents('php://input');
$param = json_decode($post, true);
$result = [];
if($param && count($param)>0){
foreach($param as $target){
$result[] = node_monitor_local('1', $target);
}
}
$data = ['msg'=>$result];
echo json_encode($data);