SRCDS Steam group


Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[COLLECTION] PHP stuff for game servers!
#21
I'm trying to intergrate this as part of a php web panel, and want to display the current status of the server (online/offline/updating). I'm trying to combine this with a server status script I found, but it returns the status as online even if the server isn't responding

PHP Code:
if ($sock = @fsockopen($_ip$_port$num$error5))
{

echo 
"".$q['name']."<br/>";
echo 
"$_ip:$_port";
echo 
'<b><FONT COLOR=lime>Online</b></FONT><br>';
echo 
"Map: ".$q['map']."<br/>";
echo 
"Players: ".$q['players']."";
echo 
"/";
echo 
"".$q['max']."<br/>";


}else{
    echo 
"$_ip:$_port<br>";
    echo 
"<FONT COLOR='RED'>Server Offline</FONT><br>";


I think I'm missing something really simple, but it displays the first argument even if the server isn't responding...any ideas?
Reply


Messages In This Thread
RE: [COLLECTION] PHP stuff for game servers! - Nomarky - 05-26-2010, 06:58 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)