Hi
I'm using php with api to control my router
how can I disable " Login By Trial " in hotspot server profile using api ?
Thanks
public function on() {
$this->load->library('routerOS');
$router = new routerOS();
$router->connect("192.168.202.7","tunnel","12345");
$rows = $router->comm("/ip/hotspot/profile/getall");
foreach($rows as $row) {
if($row['name'] == 'default') {
$query = $router->comm('/ip/hotspot/profile/set',
array('.id' => $row['.id'], 'login-by'=>'http-chap,http-pap,trial'));
}
}
}
public function off() {
$this->load->library('routerOS');
$router = new routerOS();
$router->debug=1;
$router->connect("192.168.202.7","tunnel","12345");
$rows = $router->comm("/ip/hotspot/profile/getall");
foreach($rows as $row) {
if($row['name'] == 'default') {
$query = $router->comm('/ip/hotspot/profile/set',
array('.id' => $row['.id'], 'login-by'=>'http-chap,http-pap'));
}
}
}