Так и ненашёл ответ на этот вопрос!
Нужно через PHP делать пинг до определённого сервера.
http://www.google.ru/m/search?oe=UTF-8&client=safari&hl=en&aq=f&oq=&aqi=-k0d0t0&fkt=999&fsdt=13589&q=ping+test+on+php
в первой ссылке даже скрипт приведен))
Держи))) <?
session_start();
?>
<form action="ping.php" method="post" name="domain">
<table>
<tr><td valign="top">Domain:<br><i>(one per line)</i></td><td><textarea name="domainname"></textarea></td></tr>
<tr><td valign="top">Verify:</td><td><img src="captcha.php"><br/><input type="text" name="captcha"></td></tr>
<tr><td colspan=2><input type="submit" name="submit" value="Ping Domain"></td></tr>
</table>
</form>
<?php
function pingDomain($domain){
$starttime = microtime(true);
$file = @fsockopen ($domain, 80, $errno, $errstr, 10);
$stoptime = microtime(true);
$status = 0;
if (!$file) $status = -1; // Site is down
else {
fclose($file);
$status = ($stoptime - $starttime) * 1000;
$status = floor($status);
}
return $status;
}
if (isset($_POST['submit'])) {
if ($_POST['domainname'] != "") {
if (!empty($_POST['captcha']) && strstr(strtolower($_SESSION[captchastr]),strtolower($_POST['captcha']))) {
$domains = explode("\r\n",$_POST['domainname']);
foreach ($domains as $domain) {
$domain = trim($domain);
$domainbase = (isset($domain)) ? $domain : '';
$domainbase = str_replace("http://","",strtolower($domainbase));
$status = pingDomain($domainbase);
if ($status != -1) { echo $domainbase."'s response: ".$status." ms<br/>"; } else { echo $domainbase." did not respond to our ping.<br/>"; }
}
}
else
{
echo "Bad image verification!<br/>";
}
}
else
{
echo "Please input a domain name!<br/>";
}
}
?>
$cmd = `ping server.com`;
если стоит 5.3 то сработает даже при выключенном system