[PHP] How do I get the exit code of an external program?

2003-06-22 Thread Daevid Vincent
I wish to use Ping to test if some IP addresses are up... Now I could run the command and parse to find various string components like this: [EMAIL PROTECTED] bin]# ping -n -c 3 -w 2 -q 192.168.1.60 PING 192.168.1.60 (192.168.1.60) from 192.168.1.1 : 56(84) bytes of data. --- 192.168.1.60 ping

Re: [PHP] How do I get the exit code of an external program?

2003-06-22 Thread Don Read
On 23-Jun-2003 Daevid Vincent wrote: I wish to use Ping to test if some IP addresses are up... Now I could run the command and parse to find various string components like this: snip So it seems to me there needs to be another PHP function like exec(), shell(), etc. that is the

FW: [PHP] How do I get the exit code of an external program?

2003-06-22 Thread Daevid Vincent
-Original Message- From: Daevid Vincent [mailto:[EMAIL PROTECTED] Sent: Sunday, June 22, 2003 8:05 PM To: 'Don Read' Subject: RE: [PHP] How do I get the exit code of an external program? -Original Message- From: Don Read [mailto:[EMAIL PROTECTED] Sent: Sunday, June 22

Re: FW: [PHP] How do I get the exit code of an external program?

2003-06-22 Thread Lars Torben Wilson
On Sun, 2003-06-22 at 20:19, Daevid Vincent wrote: [snip] http://us3.php.net/manual/en/function.exec.php string exec ( string command [, array output [, int return_var]]) exec() executes the given command, however it does not output anything. It simply returns the last line from the result