Public feed #603090

Anonymous

public text v1 · immutable
Raw Edit
·published 2007-07-04 14:51 UTC
rendered paste body

		  $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 " &nbsp;<img src=/xml/common/image/icons/ok-small.png>IP: ".$ip." host is UP"; 
			           }
			else { 
			print " &nbsp;<img src=/xml/common/image/icons/failed-small.png>IP: ".$ip." host is DOWN"; 
			     }
        echo "</td></tr></table>";


        echo "<br><br>";