How To See If Server Is Online with HTML/JAVA/Whatever...
#1

ok i have a website set up (its drag and drop )

i dont kno shit about HTML or whatever it is.

so, i need something that can tell people if the server is online or not.

I just want text saying 'Server Is Online' or 'Server Is Offline'
Reply
#2

Take a look at http://www.azer.nl/samp.php.txt

I'm no PHP expert, but...

Code:
<?
	if (!isset($ip))
		$ip = 'yourip';
	if (!isset($port))
		$port = 7777;

	$fp = fsockopen('udp://' . $ip, $port, $errno, $errstr);
	if (!$fp)
	{
		echo "<tr><td bgcolor=\"#2B5486\">Server Offline</td></tr>\n";
	}
	else
	{
        echo "<tr><td bgcolor=\"#2B5486\">Server Online</td></tr>\n";
	}
		fclose($fp);
	}
?>
But as i said, i code with JSP, not PHP, so i could be totally wrong...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)