what I'm trying to develop is a php script that will pull the packets(RX/TX) from each of my interfaces on my router. I will then use the number of packets as variables in a Flash file...I'm new to php, but rapidly learning...so far I'm managed to come up with a php script that will get the results I need...the only problem is I want ONLY the number of packets, take a look:
<?php
exec("ifconfig eth0", $results);
echo $results[3];
?>
and the Output:
RX packets:587787 errors:0 dropped:0 overruns:0
what I need is the packets number(587787) and nothing else...I've tried using filters, chunk and matching and haven't come up with anything...does anyone have any ideas to help me...would be MUCH appreciated!
