SRCDS Steam group

Need PHP Script - Check if server is online
Hi there. Wink

I need a simple PHP script that checks if server is online.
Can you help me?

Thanks in advance,
Google returns many results for exactly this..

You could check out LGSL standalone over at
You could easily modify my query script that I posted in the tutorial section. | xfire: toasty2
[Toast] I cant modify your script. It gives me some errors in PHP5.
Muppet, is CS:Source covered by this LGSL?

I've already done many searches with no success, so I need your help.

LGSL is a nice way to look at any server status. It includes player lists, time connected, scores as well as server settings.

You can add multiple servers to the list and look over all of them at once.

Here is an example that has been wrapped into a page:
Thanks, but I need something simple.
I already have a script to query the server, but now I need a simple one that check if server is online or not, because some servers are home-made and aren't always online.

PHP Code:
"Server offline";

All i need is a simple class to check if server is online. the fsockopen() function doesn't work, because it tries to connect to a computer by a port. If computer is ON, that port is open, but no server is running, it will return ONLINE.

Let me see if I can cook something up, source queries aren't my thing though... | xfire: toasty2
Go here for additional info:

As you can see if you get a reply from the server, it means it's online right so why not make a function that if the server replies then it's online Smile
Join the Source Dedicated Server Support Group on Steam Community!
Source Dedicated Server (SRCDS)
Free to join, Live support! (When available)

Forum Jump:

Users browsing this thread: 1 Guest(s)