Community discussions

MikroTik App
 
rifkytech
just joined
Topic Author
Posts: 4
Joined: Fri May 03, 2019 1:12 pm
Location: Medan, Indonesia
Contact:

Delete PPP Active Connection use PHP API  [SOLVED]

Fri May 03, 2019 1:16 pm

How to remove ppp active connection with php mikrotik api?

I have tried
$api_server->comm("/ppp/active/remove", array( "?name" => $usernametodelete,));
and debug log is :
<<< [18] /ppp/active/remove
<<< [20] ?name=ppp@tunnel.id
>>> [5/5] bytes read.
>>> [5, 1]!done
but ppp user remains active & has no changes
 
User avatar
seriousblack
newbie
Posts: 36
Joined: Tue Apr 03, 2018 4:02 am
Contact:

Re: Delete PPP Active Connection use PHP API

Sat Jan 02, 2021 5:05 pm

 
 $client = zero_says
 
 $wofBIT=$API->comm("/ppp/active/getall",
                    array(
                           ".proplist"=> ".id",
                                 "?name" => $client,
                              ));
                              
            $API->comm("/ppp/active/remove",
                  array(
                           ".id" => $wofBIT[0][".id"],
                           )
                  );

That works for me
:idea:

Who is online

Users browsing this forum: No registered users and 22 guests