SRCDS Steam group


Source Server Status via webpage
#1
I am writing a web page to list the status of my source servers, and I am trying to find a way to put some code on the webpage that will check if the server is up or not, and return a icon depending on if it is up or down

Does anyone know how to do this?

Kimbie
Reply
#2
Code:
<?
$ip = "youriphere";
$port = "yourporthere";
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);
}
?>
Reply
#3
This is not enough code for it to work properly. Take a look at this.
Reply
#4
Beaverbeliever Wrote:This is not enough code for it to work properly. Take a look at this.


Have you tried the code? It simply states if the server is online or offline without the extra baggage
Reply
#5
Ok, well I will test it when I get home. Seems like it will work now that I look closer Smile

Edit:
I took a look and saw that it worked great! Thanks for the code Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)