File: 0.02.54a/server/test/ping.sh (View as HTML)

  1: #!/usr/bin/php -q
  2: <?php
  3: require("../base/tests.inc.php");
  4: if ($argc!=2)
  5: 	{
  6: 	echo "Usage: ping.sh hostname\n";
  7: 	exit();
  8: 	}
  9: $host=$argv[1];
 10: while (1==1)
 11: 	{
 12: 	echo "Pinging ".$host.": ";
 13: 	$ptr=PingTest($host);
 14: 	echo $ptr."\n";
 15: 	sleep(1);
 16: 	}
 17: ?>
 18: