Ping server : System Command « Development « PHP






Ping server


<?php
   $server = "www.java2s.com";

   $count = 3;

   echo "<pre>";
      system("/bin/ping -c $count $server");
   echo "</pre>";

   system("killall -q ping");
?>

           
       








Related examples in the same category

1.Porter scanner
2.Execute shell command 'dir'
3.Ping command
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