Ping command : System Command « Development « PHP






Ping command

<?
$command = "ping -c5 www.thickbook.com";
exec($command, $result, $rval);
for ($i = 0; $i < sizeof($result); $i++) {
echo "$result[$i]<br>";
}

?>
           
       








Related examples in the same category

1.Porter scanner
2.Ping server
3.Execute shell command 'dir'
4.Execute help command and check its output
5.Using exec() to Produce a Directory Listing
6.Calling the man Command
7.Using popen() to Read the Output of the UNIX who Command
8.Using popen() to Pass Data to the column Application