Easy ping script, just what you needed

BHBodeezy

Make Money Online
ADMINISTRATOR
Joined
Aug 5, 2009
Messages
439
Reaction score
14
Points
17
Location
Christmas Island
Here is an easy way to create a script that will ping your sites, and x amount of times. If you dont have a way to ping your sites, or looking for a better way.

Make your own! ;)

Code you will need to use.

Code:
<html>
<head>
<title>Ping It!</title>
</head>
<body>
<div align="center">
<?php
$server = $_POST['server'];
$count = $_POST['count'];
?>
<h2>Enter your url and times to ping, click ping to begin.</h2>
<table style="border-width: 1px; border-style: solid;" cellpadding="5" cellspacing="6">
<form action="ping.php" method="post">
<tr>
<td>URL to ping: </td><td><input type="text" value="<?php echo $server; ?>" name="server" id="server" /></td>
</tr>
<tr>
<td>How many times to ping: </td><td><input type="texT" value="<?php echo $count; ?>" name="count" id="count" /></td>
</tr>
<td colspan="2"><input type="hidden" value="1" name="submit" /><input type="button" name="submit1" value="Ping" id="submit1" /></td>
</tr>
</form>
</table>

<?php
if ($_POST['submit'] == "1"){//submitted the form

echo "<br><h2>Results</h2><table style=\"border-width: 1px; border-style: solid;\" cellpadding=\"5\" cellspacing=\"5\"><tr><td>";
echo "<pre>";
system("/bin/ping -c $count $server");//perform ping
echo "</pre>";
echo "</td></tr></table>";

system("killall -q ping");//kill the process

}

?>
</div>
</body>
</html>
Copy the code, paste into notepad, save as ping.php. Upload that to your server, navigate to the page and let er rip.

If you have any problems or questions, please let me know.

Enjoy!
 

Master Mind

New Member
Joined
May 27, 2013
Messages
1
Reaction score
0
Points
0
Here is an easy way to create a script that will ping your sites, and x amount of times. If you dont have a way to ping your sites, or looking for a better way.

Make your own! ;)

Code you will need to use.

Code:
<html>
<head>
<title>Ping It!</title>
</head>
<body>
<div align="center">
<?php
$server = $_POST['server'];
$count = $_POST['count'];
?>
<h2>Enter your url and times to ping, click ping to begin.</h2>
<table style="border-width: 1px; border-style: solid;" cellpadding="5" cellspacing="6">
<form action="ping.php" method="post">
<tr>
<td>URL to ping: </td><td><input type="text" value="<?php echo $server; ?>" name="server" id="server" /></td>
</tr>
<tr>
<td>How many times to ping: </td><td><input type="texT" value="<?php echo $count; ?>" name="count" id="count" /></td>
</tr>
<td colspan="2"><input type="hidden" value="1" name="submit" /><input type="button" name="submit1" value="Ping" id="submit1" /></td>
</tr>
</form>
</table>

<?php
if ($_POST['submit'] == "1"){//submitted the form

echo "<br><h2>Results</h2><table style=\"border-width: 1px; border-style: solid;\" cellpadding=\"5\" cellspacing=\"5\"><tr><td>";
echo "<pre>";
system("/bin/ping -c $count $server");//perform ping
echo "</pre>";
echo "</td></tr></table>";

system("killall -q ping");//kill the process

}

?>
</div>
</body>
</html>
Copy the code, paste into notepad, save as ping.php. Upload that to your server, navigate to the page and let er rip.

If you have any problems or questions, please let me know.

Enjoy!


I want to write a simple windows script that allows one pc to ping a host (10.1.1.1) at particular times during the day. How do I go about it?
 
Last edited: