the reason is this: http://ca3.php.net/manual/en/function.exec.php
... exec() executes the given command, however it does not output anything. It simply returns the last line from the result of the command. ...
string exec ( string command [, array output [, int return_var]])
That is how u use it as per php.net exec() information sheet.
so you'd go:
<?php
$itemnum = 1;
exec("ping -c 1 eqlounge.com",$data_array,$iValue);
foreach($item in $data_array)
{
echo "Item #" . $itemnum . " - " . $item;
$itemnum++;
}
?>
From there, you should be able to see which set of data you need. That way, in your code, you will be able to say, for example set data number 5 is the ping in ms.
so you would do your exec() statement as per above, but you know it's the 5th number... $data_array[5];
that would be your ping... so... ya... i think that should work 😃 even if i'm really new at php and such, I hope my other language skills will do me justice... btw. If php starts arrays at 0 then the 5th set in the array would be $data_array[4]; just fyi