Help With passthru, system, exec

From: Date: Sun, 21 Jan 2001 16:28:38 +0000
Subject: Help With passthru, system, exec
Groups: php.general 
Request: Send a blank email to php-general+get-35904@lists.php.net to get a copy of this message
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

« previous php.general (#35904) next »