Heres the outline of the setup I used to create real-time stats on my clan site for the Holyland clan servers. You can see an example at www.holylandclan.com/qstatoutput.php .the stats pages I created are based on and use the technology of Qstat version 2.5c. Find the appllication and a complete description of the tool at www.qstat.org . This setup assumes you use a Linux Apache webserver. Email me if you have any questions or suggestions on how to improve this or to do it easier......Im not claiming to have produced anything amazing here. I kind of just hacked this together one weekend. If it helps some admins, great. Some people have asked me for the scripts and setup I used, so here it is: This setup is based on Moh:aa as the game server. There are slight changes necessary for other games. See the Qstat website for details, or email me. The setup includes five separate files: two scripts (qload.sh and qlds.sh), a text file (qstat-player.txt), a template file (qstat-template) and a .php webpage (qstatoutput.php -you dont have to use PHP. Html is fine). I have listed them all below. This means you will have to copy the data into five separate files as oulined below...... The two scripts function to run Qstat in the background and to run it every 60 seconds. Qstat then gathers stats from the server useing the text file to determine what data to take from the server. This information is then sent through the template to the PHP page. All this is instructed in the qlds.sh script using qstat functions. What I did first was to upload the Qstat 2.5c to my website cgi-bin and run 'make' to install the application. Then I upload the two scripts, one text file and the template to the cgi-bin as well. The PHP web page is located under my web root. For me, this is home/myname/www Below is the script I use to load the qstat application in a 'screen' and then detach it so that the application will run in the background. Copy this data and save it to your cgi-bin as 'qload.sh' ------------------------------------------- #!/bin/bash echo qload.sh: Load Qstat With Screen echo qload.sh: Screen Qstat Detached Console screen -S qstat -m -d ./qlds.sh echo qload.sh: Finished Screen Command ------------------------------------------- Below is the script used to run the Qstat application every 60 seconds. It s just a simple looping script with the qstat program line. Copy this data and save it to your cgi-bin as 'qlds.sh'. IMPORTANT: dont forget to Change '/home/myname/www/qstatoutput.php' to the path to your stats webpage. Obviously, also replace the IP address listed below with that of your game server. ------------------------------------------- #!/bin/bash echo qlds.sh: Launching Qstat echo qlds.sh: Loop Initialize while true do echo qlds.sh: Loop Start echo qlds.sh: To Exit Loop Hit CTRL-C While Sleeping sleep 30 echo qlds.sh: qstat Start ./qstat -gps 207.44.168.46:12300 -R -P -Tp qstat-player.txt -Ts qstat-template.txt -of /home/myname/www/qstatoutput.php echo qlds.sh: Server Exit echo qlds.sh: To Exit Loop Hit CTRL-C While Sleeping echo qlds.sh: Sleep 15 Seconds sleep 30 echo qlds.sh: Loop Restart done -------------------------------------------- Below is the text file data which instructs qstat what data to obtain from the server and how to structure it. copy this data and save it as 'qstat-player.txt' to your cgi-bin. --------------------------------------------
$PLAYERNAME $PLAYERPING
-------------------------------------------- Below is the Qstat Template file I wrote and use. I have taken out my Flash movie data, and the PHP code because I dont want anyone to think this is required information. You can add any HTML, PHP, Java or Flash to this template as you see fit. Place the included HTML in-between the 'body' tags on you page, then save it to your cgi-bin as 'qstat-template.txt' --------------------------------------------

Last update: $NOW

Server IP Address: $IPADDR

Server Name: $SERVERNAME

Ping from this web server: $PING

Number of current players: $PLAYERS / $MAXPLAYERS

Current Map: $MAP

 
Player Name Ping

$PLAYERTEMPLATE --------------------------------------------- And finally, the actuall web page. This page is actually created from your template file. It will be over-written entirely every 60 seconds, so it doesnt matter what you put here. It can even be a blank .HTM page. Some servers might require the page to be there in order for Qstat to update it. Others will allow the page to be created by Qstat if it doesnt exist. This all depends on your folder access levels, permissions, etc. Its easiest to just create a blank .html page and save it to your www root. Save it to your www root as 'qstatoutput.htm' (or .PHP, etc). --------------------------------------------

Last update: $NOW

Server IP Address: $IPADDR

Server Name: $SERVERNAME

Ping from this web server: $PING

Number of current players: $PLAYERS / $MAXPLAYERS

Current Map: $MAP

 
Player Name Ping

$PLAYERTEMPLATE ------------------------------------------- Last, 'cd' into your qstat directory. Should now be cgi-bin/qstat .Then simply execute the qload.sh script. To do this enter './qload.sh' (no quotes). Your Qstat should now run in the background refreshing the stats webpage every 60 seconds. NOTES: Some web hosts may not like that you have a looping script running 24/7 (even though all it does is ping the server and uses virtually no resources). Other hosts may not allow you to actually 'make' qstat to your cgi-bin. Most will without a problem, but thought I'd mention this. If you are hosting your site....well, good for you. You wont have to worry. Email all questions and comments to handgrenade@holylandclan.com