Menu: | Home | All tasks | DNS | Ping host | TraceRoute host | Subnet Calculator | Check |
php.Ping @ hardnet.ro
Your IP address is and your hostname is ".$client_hname."";?>
$data) echo "$key --> $data
"; $register_globals = (bool) ini_get('register_gobals'); $system = ini_get('system'); $unix = (bool) $unix; $win = (bool) $windows; // If ($register_globals) { $ip = getenv(REMOTE_ADDR); $self = $PHP_SELF; } else { $submit = $_GET['submit']; $count = $_GET['count']; $host = $_GET['host']; $ip = $_SERVER['REMOTE_ADDR']; $self = $_SERVER['PHP_SELF']; }; $count = str_replace("&","& exit",$count ); $host = str_replace("&","& exit",$host ); $submit = str_replace("&","& exit",$submit ); $ip = str_replace("&","& exit",$ip ); $self = str_replace("&","& exit",$self ); // echo $count; // form submitted ? If ($submit == "Ping!") { if (!is_numeric($count)) die("fuck off!"); // over count ? If ($count > $max_count) { echo 'Maximum for count is: '.$max_count; echo 'Back'; } else { // replace bad chars $host= preg_replace ("/[^A-Za-z0-9.]/","",$host); echo ''; echo("
Ping Output:"); echo '
';           
				//check target IP or domain
				if ($unix) 
					{
					system ("ping -c$count -w$count $host");
					system("killall ping");// kill all ping processes in case there are some stalled ones or use echo 'ping' to execute ping without shell
					} else 	{
							system("ping -n $count $host");
							}
				echo '
'; } } else { echo ''; echo '

Your IP is: '.$ip.'

'; echo '
'; echo ' Enter IP or Host '; echo ' Enter Count '; echo ' '; echo '
'; echo '
'.$system.''; echo ''; } include ("includes/footer.php"); // php END; <-- ?>