Code: Select all
$addRequest = new RouterOS\Request('/ip hotspot walled-garden add dst-host=www.example.com');
$client($addRequest);
Thanks
$addRequest = new RouterOS\Request('/ip hotspot walled-garden add dst-host=www.example.com');
$client($addRequest);
$util = new RouterOS\Util($client);
$util
->setMenu('/ip hotspot walled-garden')
->remove(
RouterOS\Query::where('dst-host', 'www.example.com')
);
$util = new RouterOS\Util($client);
$util
->changeMenu('/ip hotspot walled-garden')
->remove(RouterOS\Query::where('dst-host', 'www.example.com')
);
$client($util);
$util->changeMenu('/ip hotspot walled-garden');
$util->remove(RouterOS\Query::where('dst-host', 'www.example.com'));
$printRequest = new RouterOS\Request(
'/ip hotspot walled-garden getall .proplist=dst-host',
RouterOS\Query::where('comment', 'something')
);
echo $client->sendSync($printRequest)->getArgument('dst-host');
Yep.i guess i need a for / foreach , Right?
Damn it! You had me so hopeful there, that you finally get the overall flow and didn't need further instructions.Like?
foreach ($client->sendSync($printRequest)->getAllOfType(Routeros\Response::TYPE_DATA) as $response) {
echo $response('dst-host');
}
That doesn't mean anything... Usually, older people have harder time learning, and you're younger than me (and I'm in my 20's right now), and I think I still learn stuff OK.I'm twenty & I'm Italian
Oh, I have. You have no idea .have patience
Respect! :')Oh, I have. You have no idea .
what's mikritik?yes are apologies but a month ago I did not know what mikrtik was
$util = new RouterOS\Util($client);
$util->changeMenu('/ip hotspot walled-garden');
$util->remove(RouterOS\Query::where('dst-host', 'something') && ('comment', 'something'));
What?how you Doing?
$util->remove(RouterOS\Query::where('dst-host', 'something')->andWhere('comment', 'something'));
In general, ask yourself how would you do it from a console.2 ) is it possible to modify session timeout ofa hotspot user profile (php) ?
$util->changeMenu('/ip hotspot user profile');
$util->set(
'default',
array(
'session-timeout' => '20m'
)
);