note 33226 added to function.exec

From: Date: Thu, 19 Jun 2003 16:46:48 +0000
Subject: note 33226 added to function.exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-50664@lists.php.net to get a copy of this message
Using ping function in PHP --------------------------------------- You can use the extended version of this program to check the network status and later you can add HTTP.FTP.POP3 and SMTP protocols as its part. Access the content of exec from a variable, make radio buttons for each protocol and change the value of variable according to te radio button selection. [Use ping with count and deadline] <META http-equiv="Refresh" content="3"> <?php $str=exec("ping -c 1 -w 1 192.168.1.216",$a,$a1); print "<table>"; if(strlen($str)>1){ print"<tr><td bgcolor='#fff000'>present</td></tr>"; }else{ print"<tr><td bgcolor='#000000'>Not present</td></tr>"; } print "</table> "; ?> ---- Manual Page -- http://www.php.net/manual/en/function.exec.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33226 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33226&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33226&report=yes

« previous php.notes (#50664) next »