|
|
|
|
|
|
| |
| <?
// I hope this simple script help you
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>NDH Ping Service</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
if (isset($_POST['ip']))
{
$ip = $_POST['ip'];
}
else
{
$ip = $_SERVER['REMOTE_ADDR'];
}
//Print some Client relevant Information
?>
Your IP: <?=$_SERVER['REMOTE_ADDR'];?><br>
Your Browser: <?=$_SERVER['HTTP_USER_AGENT'];?><br>
Your Browser Port is: <?=$_SERVER['REMOTE_PORT'];?><br>
<form method="post" action="ping.php">
IP <input type="text" name="ip" value="<?=$ip;?>">
<select name="repetir">
<?
for ($x=1;$x<21;$x++)
{
?>
<option value="<?=$x;?>"><?=$x;?></option>
<?
}
?>
</select> Repeticiones
<br>
<input type="submit" value="Ping">
</form>
<pre>
<?
if ((isset($_POST['ip'])) && ($_POST['ip']!=""))
{ //Here we build the Command
$cmd = "ping -c " . $_POST[repetir] . " " . $_POST['ip'];
// execute the command and print the result
system($cmd);
}
// note the <pre> html tag for the print
?>
</pre>
</body>
</html> | | |
|
| Class for sending mail with MIME attachments in multipart format using external sendmail, mimencode and zip Categories : Email, Network, PHP, PHP Classes | | | PHP4 HTTP Compression Speeds up the Web Categories : PHP, Zlib, HTML and PHP, HTTP, Network | | | WebServerSpy checks which kind of Webserver is running, Apache, Netscape, Fasttrack, IIS, HTTP-Header, HTTP 1.0, GET, spy, WWW Categories : HTTP, Network, Apache, PHP, Web Servers | | | Examines the user's computer for open Netbus (the trojan horse) port and reports the conclusion to the user. Categories : Network, PHP | | | Client classes for Dictionary servers UPDATED: 2000-06-06 Categories : Network, Search, Complete Programs, PHP Classes, PHP | | | whois domain name lookup dns url Categories : PHP, Search, Network | | | How to get the exit code and result of an exec() command. Categories : PHP, Network | | | Create MRTG Graphic from rrd database (Need MRTG and RRDTool installed). Categories : PHP, Network, Graphics | | | Sample usage of IPv6 and IPv4 with PHP Categories : PHP, PHP Classes, Network | | | IPTables Bandwidth statics Categories : PHP, Security, Network | | | An email validation script that actually checks against the recipient's mail server. Categories : Email, Complete Programs, PHP, Network, Debugging | | | Function that returns an IP Address if it's correct. IMPROVED!!! Categories : PHP, Algorithms, Network | | | redirect redirection ip address authentication authenticate addr Categories : Authentication, HTTP, Network, PHP | | | Class that allows the PHP developer to establish connections with a POP3 mail server amd be able to list, retrieve and delete mail messages from a given mail box.
Categories : Network, Email, PHP, PHP Classes | | | Query2Report : Generating Html, Pdf and Csv Reports from SQL Query Categories : PHP, PHP, HTML, PDF, Excel | |
| | | | Joseph Crawford wrote : 1304
here is a converted version to work with windows :), granted you cannot specify how many times to repeat because i am not sure you can do that with windows ping.
<?
// I hope this simple script help you
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>NDH Ping Service</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
if (isset($_POST[`ip`]))
{
$ip = $_POST[`ip`];
}
else
{
$ip = $_SERVER[`REMOTE_ADDR`];
}
//Print some Client relevant Information
?>
Your IP: <?=$_SERVER[`REMOTE_ADDR`];?><br>
Your Browser: <?=$_SERVER[`HTTP_USER_AGENT`];?><br>
Your Browser Port is: <?=$_SERVER[`REMOTE_PORT`];?><br>
<form method="post" action="ping.php">
IP <input type="text" name="ip" value="<?=$ip;?>">
<br>
<input type="submit" value="Ping">
</form>
<pre>
<?
if ((isset($_POST[`ip`])) && ($_POST[`ip`]!=""))
{ //Here we build the Command
$cmd = "ping -a " . $_POST[`ip`];
// execute the command and print the result
system($cmd);
}
// note the <pre> html tag for the print
?>
</pre>
</body>
</html>
| | | | David Perez wrote :1305
ok for windows Users here is the trick
change this line
$cmd = "ping -c " . $_POST[repetir] . " " . $_POST[`ip`];
for this one
$cmd = "ping -n " . $_POST[repetir] . " " . $_POST[`ip`];
the windows ping use the switch n for the count
| |
|
|
|