server info on webpages
server info on webpages
can anyone point me in the right direction for getting server info (like the players online) onto a webpage? I'm guessing it requires a program that will connect to each server and request a list of players and stuff right? or is there open source available for that already?
There's the source code for the ct version here if you want to unravel it.
mainpage.php is the summary displayed at the base of the ct forums.
serverbrowser.php is the ct server browser
getservers.sh is the script running to pull the info periodically off wrtlprnft's server.
There's many other server browsers, but this should get you started.
mainpage.php is the summary displayed at the base of the ct forums.
serverbrowser.php is the ct server browser
getservers.sh is the script running to pull the info periodically off wrtlprnft's server.
There's many other server browsers, but this should get you started.
- wrtlprnft
- Reverse Outside Corner Grinder
- Posts: 1679
- Joined: Wed Jan 04, 2006 4:42 am
- Location: 0x08048000
- Contact:
Re: server info on webpages
Such a program exists, actually there's two different ones.zoidberg wrote:I'm guessing it requires a program that will connect to each server and request a list of players and stuff right? or is there open source available for that already?
Tank's script was written by reverse engineering the protocol, it has some problems with special characters on occasion, the source is available at the bottom of the page.
My version is based on arma's source code and reads some more information from the servers, and it can connect to a server like a client to get even more info.
If you just need a list of all players and servers I suggest you just use the XML feed Durka linked to to reduce the load on the servers and to avoid the relatively lengthy process of polling all servers.
There's no place like ::1
okay,
I got a happy little perl parser done for anyone who wants it.
It highlights player names with .dBd| tags and has a sort of sloppy HTML output but if you know even a little about perl you can go in and change all that.
Here it is for anyone in the future who wants it
all one needs to do is plug the HTML output into a webpage.
I got a happy little perl parser done for anyone who wants it.
It highlights player names with .dBd| tags and has a sort of sloppy HTML output but if you know even a little about perl you can go in and change all that.
Here it is for anyone in the future who wants it
all one needs to do is plug the HTML output into a webpage.
- Attachments
-
- armaSXMLParser.zip
- XML parser that generates HTML output from serverxml.php arma server stats file. This includes the script that gets the xml file as well.
- (3.78 KiB) Downloaded 246 times