update wa official API

This commit is contained in:
WD - Dev
2025-10-07 21:01:15 +07:00
parent efca8f5f80
commit eb13c69431
55 changed files with 138040 additions and 1543 deletions
+1 -1
View File
@@ -226,7 +226,7 @@
<?php
if (isset($_POST['test'.$server['id']]))
{
$script = ':global hsa "";:global pppa "";:local id [/system license get software-id];:local idbm ($id."'.$server['id'].'");:local uptim [/system resource get uptime];:local bname [/system resource get board-name];:foreach i in=[/ppp active find] do={:local name [/ppp active get $i name];:local ip [/ppp active get $i address];:set $pppa ("$pppa$name_$ip|");};:foreach h in=[/ip hotspot user find comment!="" and uptime<20m] do={:local cek [:pick [/ip hotspot user get $h comment] 0 6];:if ($cek = "Login.") do={:local hsuser [/ip hotspot user get $h name];:local hscom [:pick [/ip hotspot user get $h comment] 6 50];:set $hsa ("$hsa$hsuser_$hscom|");}};/tool fetch url="https://manjapro.net/api/mikrotik.php" mode=https http-method=post http-data="{\"id\":\"$idbm\",\"bm\":\"$bname\",\"ut\":\"$uptim\",\"hsa\":\"$hsa\",\"pppa\":\"$pppa\"}" keep-result=no;:delay 1s;:set $pppa ("");:set $hsa ("");';
$script = ':global hsa "";:global pppa "";:local id [/system license get software-id];:local idbm ($id."7");:local uptim [/system resource get uptime];:local bname [/system resource get board-name];:foreach i in=[/ppp active find] do={:local name [/ppp active get $i name];:local ip [/ppp active get $i address];:local mac [/ppp active get $i caller-id];:set $pppa ("$pppa$name_$ip_$mac|");};:foreach h in=[/ip hotspot user find comment!="" and uptime<20m] do={:local cek [:pick [/ip hotspot user get $h comment] 0 6];:if ($cek = "Login.") do={:local hsuser [/ip hotspot user get $h name];:local hscom [:pick [/ip hotspot user get $h comment] 6 50];:set $hsa ("$hsa$hsuser_$hscom|");}};/tool fetch url="https://manjapro.net/api/mikrotik.php" mode=https http-method=post http-data="{\"id\":\"$idbm\",\"bm\":\"$bname\",\"ut\":\"$uptim\",\"hsa\":\"$hsa\",\"pppa\":\"$pppa\"}" keep-result=no;:delay 1s;:set $pppa ("");:set $hsa ("");';
error_reporting(0);
{
$API = new RouterosAPI();