Code: Select all
$API->write('/ip/dhcp-server/lease/print', false);
$API->write('~active-address~"1.1."');
$ARRAY = $API->read();
$API->disconnect();
What is the basic syntax for SNMP commands via API? I use the command below, but something is certainly missing.
Code: Select all
$API = new RouterosAPI();
$API->write( "/ip/snmp/print" ); // or $API->write( "/tool snmp" );
$API->write('=address=177.xx.xxx.xx', false);
$ARRAY = $API->read();
var_dump( $ARRAY );