Community discussions

 
welitonxd
just joined
Topic Author
Posts: 5
Joined: Sun Jul 08, 2018 5:53 am

Help With API commands  [SOLVED]

Sat Aug 25, 2018 6:50 am

I Have this scripts and works well to give me the name of the pppoe clientes disconnected, i want convert this for api, for me populate an xml.

:foreach clientes in=[/interface find where running=no && type=pppoe-in] do={:set $disconn value=([/interface get $clientes name].

In API i put

Code: Select all

$API->write("/interface/print",false);
$API->write('=type='.$pppoein,false);
$API->write('=running='.$running,true);
$READ = $API->read(false);
$ARRAY = $API->parse_response($READ);

$num =count($ARRAY);
for($i=0; $i<$num; $i++){
$no=$i+1;
echo "<td>".$ARRAY[$i]['name']."</td> <br>";
She's me returned an unknown parameter (in debug api), where are my mistake?

Who is online

Users browsing this forum: No registered users and 3 guests