$ip_add = $record['ip_add'];
$numberping = 1;
$ip = $ip_add;
$name = gethostbyaddr($ip);
$str = exec("ping -c $numberping $ip");
$length = strlen($str);
if($length > 1) {
print "
IP: ".$ip." host is UP";
}
else {
print "
IP: ".$ip." host is DOWN";
}
echo "";
echo "
";