Is there a way that I can monitor the traffic, Upload/Download (separately) using PHP?
I`d like to echo out something like that:
Upload: 523 GB | Download: 25 GB
This should be based on the System Uptime, so if I restart the computer, the count should restart.
Thanks in Advance.
Best Answer
Just run
ifconfig
from within php and parse out the TX/RX fields.Another option would be to use the php snmp libraries and query the ifinoctet and ifoutoctet OIDs.