-
Notifications
You must be signed in to change notification settings - Fork 4
Example 2
Nick Otter edited this page Jun 27, 2013
·
2 revisions
Origonally from: http://wiki.mikrotik.com/wiki/API_PHP_class#Example_2
<?php
require_once "vendor/autoload.php";
use \RouterOS;
$API = new RouterOS\Core();
$API->debug = true;
$API->write('/interface/wireless/registration-table/print',false);
$API->write('=stats=');
####Output
Array
(
[0] =>
Array
(
[.id] => *147
[comment] =>
[interface] => AP101
[mac-address] => 00:0B:6B:37:58:33
[ap] => false
[wds] => false
[rx-rate] => 11Mbps
[tx-rate] => 11Mbps
[packets] => 4043966,2669114
[bytes] => 3961713942,280551024
[frames] => 4043966,2669114
[frame-bytes] => 3937477458,264536340
[hw-frames] => 4500839,2669114
[hw-frame-bytes] => 256326637,349947988
[tx-frames-timed-out] => 0
[uptime] => 1w13:09:12
[last-activity] => 00:00:00.090
[signal-strength] => -73dBm@11Mbps
[signal-to-noise] => 30
[strength-at-rates] => -73dBm@1Mbps 4m4s640ms,-73dBm@2Mbps 4m58s730ms,-73dBm@5.5Mbps 42s450ms,-73dBm@11Mbps 90ms
[tx-ccq] => 91
[p-throughput] => 5861
[ack-timeout] => 31
[last-ip] => 192.168.0.220
[802.1x-port-enabled] => true
[wmm-enabled] => false
)
[1] => Array
(
...
)
...
)