Change Profile of PPP Secret in Mikrotik using Mikrotik API

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Change Profile of PPP Secret in Mikrotik using Mikrotik API



I just want to use this code ( ppp secret set profile="NON-Payment" ) instead of using ( /ppp/secret/disable ) in the 3rd last last line of this code. I tried but no success. Please help.


try
$client = new RouterOSClient($m['ip_address'], $m['username'], $m['password']);
catch (Exception $e)
die('Unable to connect to the router.');

$printRequest = new RouterOSRequest('/ppp/secret/print');
$printRequest->setArgument('.proplist', '.id');
$printRequest->setQuery(RouterOSQuery::where('name', $c['username']));
$id = $client->sendSync($printRequest)->getProperty('.id');
$setRequest = new RouterOSRequest('/ppp/secret/disable');
$setRequest->setArgument('numbers', $id);
$client->sendSync($setRequest);




1 Answer
1



Finally i have done this without any help.



by just replacing


'/ppp/secret/disable'



with


'/ppp/secret/set profile="NON-Payment"'






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Creating a leaderboard in HTML/JS