DaLightz
See ya'll in the afterlife.
- May 19, 2012
- 1,136
- 262
In-browser pinging script
By CookieMonsta
I've programmed this about 2 years ago. It was one of my first php script to be created. I figured I'd share this since I don't have use for it anymore, and it could maybe help others.
Installation-
- Copy and paste the script below into notepad, or any other word processing application.
- Save as index.php.
- Save the document to htdocs root (using xampp.)
- Now go to
You must be registered for see links- You should see it working.
Configuration-
- Open the document with a word processing application.
- Look for "Site_ip = "
You must be registered for see links";"
- Edit "
You must be registered for see links" to any other address / ip. (Don't forget theYou must be registered for see links.)
- Save and refresh the page.
The script-
PHP:
<html>
<?php
/*
* @author Kris "CookieMonsta"
*
* @prj Website ping
* @file index
*/
/* Configuration */
$Site_ip = 'www.google.com'; # Site ip (This will be pinged)
$Node = 'This is a development node.'; # Add extra nodes like this.
/* Script */
exec("ping " . $Site_ip, $output, $result);
print_r($output);
/* Ceckup */
if ($result == 0)
{
echo "<br><br><br> Status: Ping successful!";
} else {
echo "<br><br><br> Status: Ping unsuccessful!";
}
?>
</html>