Respect! :')Oh, I have. You have no idea .
$util = new RouterOS\Util($client);
$util
->changeMenu('/ip hotspot walled-garden')
->remove(RouterOS\Query::where('dst-host', 'www.example.com')
);
$client($util);
$addRequest = new RouterOS\Request('/ip hotspot walled-garden add dst-host=www.example.com');
$client($addRequest);
but I don't need to do this . this is a temporary Situation just to tryyRouterBOARD
just access the same web server (the same PHP file, located at the same place) from a different PC?
Fatal error: Call to a member function sendSync() on a non-objectTry to replacewithCode: Select all$client($addRequest);
Code: Select all$client->sendSync($addRequest);
$routerQuery = http_build_query(
array(
'username' => $user,
'password' => $psw
)
);
header('Location: http://192.168.5.1/login?'.$routerQuery);
$addRequest = new RouterOS\Request('/ip hotspot user add'); $addRequest ->setArgument('name', $user) ->setArgument('password', $psw); $client($addRequest);3 - Which http request for logging user in?
ok so since the router can't interpret php I imagine that there is some javascript that "unlocks" the client device... how?The router will "unlock" the client device
header('Location: http://192.168.5.1/login?' . $routerQuery);
ok now from ether5-GUEST I open logs.php but I get "Unable to connect to RouterOS."Specify 192.168.1.2 as the IP, not 192.168.5.1.
yes! but how?You could use the API to create a temporary hotspot username and password (also set the account to remove itself on log out), and then redirect the user to the router with the generated username and password in the URL.
how ?Just be sure you have port-forwarded the correct ports on your gateway router.