How to get TX / RX bytes through mikrotik's api php?
I'm not getting it in version V6.47.3
Sorry, my problem is when I get the pppoe interface, the api does not return the "name", as in the image below.Return "byte" data in the format "RX, TX" (ie "545124,25422"). So you need to do a little trick to pull the RX string: look for the "," character and pull the string before that comma. : local posComma [: find $ bytes "," -1] : local RXbytes [: pick $ bytes 0 $ posComma]