routeros-api-php
routeros-api-php copied to clipboard
Unable to use /ping will not output the content
Unable to use /ping will not output the content
In RouterOS ping tool is never ending (as it's Linux based), which would expect this API to read the continuous output, but the router will never issue !done whilst the command is running. So you'll never get the output.
You'll want to add count to the end of the command to get an output and close off the connection.
See https://github.com/EvilFreelancer/routeros-api-php/blob/master/examples/monitoring.php for an example of monitoring traffic on an interface by adding once to the query.
Yep, need to limit it via count of packets.