Game Server Monitor

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Whoo
Forum Newbie
Posts: 1
Joined: Thu Aug 05, 2010 4:58 pm

Game Server Monitor

Post by Whoo »

Hello. For the past day and a half I've been searching for simple scripts that would send the server status, the number, and the map name to a web page. All the scripts that I have found will either permanently display "Online", or "Offline". It's becoming frustrating. The most simple one I've found still doesn't function correctly:

Code: Select all

<? 
$ip = "66.79.190.40"; 
$port = "27960"; 
if (! $sock = @fsockopen($ip, $port, $num, $error, 5)) 
echo '<B><FONT COLOR=red>Offline</b></FONT>'; 
else{ 
echo '<B><FONT COLOR=lime>Online</b></FONT>'; 
fclose($sock); 
} 
?>
The games I'm going to try and query are the original Quake Games(One, two, and three). Thank you in advance.
Post Reply