for example i need to add 1000 new users to hotspot I'm using for loop in php, it's take long time.
how can i send them one command to mikrotik not one by one.
$API = new RouterosAPI();
if ($API->connect($mikrotik_ip, $username, $password )) {
for ($i=0; $i < $usernumber; $i++) {
$user = random_int(1111,9999);
$pass = random_int(111,999);
$i = $API->comm("/ip/hotspot/user/add", array("name"=>"$user","password"=>"$pass","limit-uptime"=>"24h"));
}
}
this is my class
https://github.com/BenMenking/routeros-api