[5165] server status checker

02/12/2010 17:36 ASSN9NE#1
i was wondering if any1 has a server status checker for Epic WebServer 2 add 2 my main co site so people can stop asking "is server on or off?"
i have tried this but it faild

Code:
<?php
print"SERVER:HERE";
$ip = "IP:HERE";
$port = "9958";
if (! $sock = @fsockopen($ip, $port, $num, $error, 5))
echo '<B><FONT COLOR=red>Offline</b></FONT>';
else{
echo '<B><FONT COLOR=green>Online</b></FONT>';

fclose($sock);
}
?>
[Only registered and activated users can see links. Click Here To Register...]

once i get the server status checker i can make it for the login server and create account server also
btw im not using the appserver/www folder
02/12/2010 19:58 Virapha28#2
delete the variables $error and $num and try again
xD
02/12/2010 23:18 pro4never#3
Also that will only see if the remote host is accepting connections on that port, not if the server itself is online.

One way to do it (which I plan to implement soon) is a separate program that checks the running processes every 1-5 minutes checking if both game and login server are running. If they are it updates the database to say server is online, if not it re-opens them. Also plan to have it auto restart both every 12 or 24 hours.


Unless you have something like that, or something written into your source itself that allows a remote connection to grab info from the server, you won't be able to do a 'real' status checker.
06/19/2010 21:59 masternek#4
whats the code to make status checker for 5165, but not epix webserver?