This method I used is based of a method I saw used to check game servers to see if the servers were online, so just decided to throw mix it up into a "Down For Everyone Or Just Me" kinda script.
Its not pretty lol its just the script and basic submit form.
But enjoy!
Index.php
Code:
<html>
<head>
<title>Down For Everyone?</title>
</head>
<body>
<div align="center">
<br />
<form method="post" action="check.php">Is <input type="text" name="site" size="25"> Down For Everyone Or Just <input type="submit" value="Me" name="submit"></form>
<br />
<br />
<a href="http://techforumz.net/">Tech Forumz</a>
</div>
</body>
</html>
Check.php
Code:
<?php
if (isset($_POST['submit']))
{
$ip = ($_POST['site']);http://f47al3rr0r.net/forum/images/smilies/wtf.gif
$port = "80";
if (! $sock = @fsockopen($ip, $port, $num, $error, 5))
echo "<b><div align='center'><font color='red' size='21'>Looks Down From Here</div></b></font>";
else
{
echo "<b><font color='lime' size='21'><div align='center'>Looks Up From Here</b></font>";
echo "<b><br /><a href='index.php'>Try Another Site</a></div>";
fclose($sock);
}
}
?>