pagination api mikrotik with php
<?php
require_once('function.php');
$API = new RouterosAPI();
$API->debug = false;
if ($API->connect($ipmikrotik, $usermikrotik, $passmikrotik)) :
$result = $API->comm('/tool/user-manager/user/print', [
// '' => ''
]);
$offset = 1;
$limit = 100;
$arr = array_slice($result, $offset * $limit, $limit);
echo '<pre>';
print_r($arr);
// foreach ($arr as $row) {
// echo '<pre>';
// print_r($row);
// }
$API->disconnect();
endif;
Comments