Hi Everyone,

I've been trying to write something to ping a URL on the system level, and
keep the output in an array.  I've been trying to work with system, exec,
and passthru, but it looks as though they all return only the last line of
the output.  How would I put the whole output into the array?  A different
function, or possible it was with backtics, though I couldn't find any
examples that did this.  Any help would be appreciated.

if($IP)
{
   $systemstring=escapeshellcmd("ping $IP -c 1");
   $array = passthru("$systemstring",$returnvalue);
   echo $array;  -->  This outputs only the last line
}

Thanks,
Pete


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to