Jump to content
Sign in to follow this  
sickboy

Reading ArmA Server Info in PHP for website usage

Recommended Posts

I'm Pleased to present to you the 6th Sense Advanced Server Query Script v0.5!

Full Description is available at the Wiki page.

Links:

[*]6thSense.eu Advanced Server Query Wiki

<span style='color:red'>As of now, all information (incl. Downloads) regarding 6thSense.eu is to be found in our:

[*]6th Sense Community Wiki

[*]ArmA Trac/Wiki Development Area</span>

Mirrors:

ArmaHolic.com (Thanks to Foxhound)

More mirrors kindly requested!

Share this post


Link to post
Share on other sites

Added my Findings to first post..

Should get anyone on the move who knows basic php, or already has gamespy scripts or experience

Share this post


Link to post
Share on other sites

On a (semi-) related topic... I'm wondering if it's possible to access the ArmA log file while the game/server is running?

If it is the new "echo" command would make it possible to have mission status etc. live on a web-site and may come in handy for big scale missions/on-line wars.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

echo

Description: Sends any text into the debugger console or the logfile.

Syntax: echo text

Parameters: text: String

Return Value: Nothing

Example 1: echo "Text in logfile"

/KC

Share this post


Link to post
Share on other sites

Binary format (at least with OFP and VBS1) doesn't contain player specific information.

Share this post


Link to post
Share on other sites
Binary format (at least with OFP and VBS1) doesn't contain player specific information.

But ArmA does

This is what we get back:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> gamever1.00hostname6thSense.eu 01 (info @ www.6thsense.eu)mapnamegametypenumplayers0numteams0maxplayers65gamemodeopenwaitingtimelimit0password1pa

ram17param20currentVersion100requiredVersion100modCAequalModRequired1gameState1dedicated1p

latformwinlanguage65541difficulty1missionplayer_team_score_deaths_

Share this post


Link to post
Share on other sites

Updated first post with updated scripting, had trouble with how I did it before.

Share this post


Link to post
Share on other sites

I was just about to say "ask Daddl" but he found his way already. So I hope somebody will get this working for ArmA soon... SES server is just around the corner and it would be great to hahve the server box on the site again. wink_o.gif

Share this post


Link to post
Share on other sites
This is what we get back:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> gamever1.00hostname6thSense.eu 01 (info @ www.6thsense.eu)mapnamegametypenumplayers0numteams0maxplayers65gamemodeopenwaitingtimelimit0password1pa

ram17param20currentVersion100requiredVersion100modCAequalModRequired1gameState1dedicated1p

latformwinlanguage65541difficulty1missionplayer_team_score_deaths_

That looks more like GameSpy style answer - which is just a simple string you simply analyze using regular expressions (search this forum and you'll even find a well documented description of the format). If ArmA binary format (i.e. the query the internal game browsers of OFP and VBS used) actually contained the player information, tho, that would be very nice! I can't check this atm, as I ordered the German version.

Feel free to use pDSSQ as a base. You might need to adapt the script somewhat. Also for a binary query the Byte sequence must be adapted to the one used by ArmA. It's used for example in my sig to query the CiA server.

Share this post


Link to post
Share on other sites
That looks more like GameSpy style answer - which is just a simple string you simply analyze using regular expressions (search this forum and you'll even find a well documented description of the format). If ArmA binary format (i.e. the query the internal game browsers of OFP and VBS used) actually contained the player information, tho, that would be very nice! I can't check this atm, as I ordered the German version.

Feel free to use pDSSQ as a base. You might need to adapt the script somewhat. Also for a binary query the Byte sequence must be adapted to the one used by ArmA. It's used for example in my sig to query the CiA server.

Hmmm well, I was using your script as base smile_o.gif

I must admit, with the gamespy or binary answers etc. etc. I really have no clue what we are talking about...

Just that at first I used your Gspy query and that didn't give any info...  Only after using your Binary method I was receiving data (Altough Not proper) smile_o.gif Hence I took it for granted that this is Binary mode smile_o.gif. After reading the text on the kquery.com site, I had the correct query string and voila.

Anyway... I got it working 100% since the changes readable in my first post.

Thanks for help eitherway... DSSQ rules smile_o.gif Program and PHP script smile_o.gif

Share this post


Link to post
Share on other sites

What I would like to see comming from you guys who are clever enough to code such things is a installable script to display the server info. we have such a thing for Joint operations, you can see how the script works here:-

http://www.16aab.org.uk/server/

It displays players, map type, name of map, sever open or passworded. Something thats as easily placed into existing websites would be great.

second thing would be for some clever bloke to develop a remote server admin tool for AA so we can admin the server settings etc from your desktop without logging into an admin web page or joining the game server to admin it.

I have no idea how to create such things or i would gladly contribute.

Share this post


Link to post
Share on other sites
It displays players, map type, name of map, sever open or passworded. Something thats as easily placed into existing websites would be great.

second thing would be for some clever bloke to develop a remote server admin tool for AA so we can admin the server settings etc from your desktop without logging into  an admin web page or joining the game server to admin it.

I have no idea how to create such things or i would gladly contribute.

Try DSSQ from daddl, it is already as you want it, and can even display the stuff on top of an Image, as you can see in my sig wink_o.gif

You can remotely admin the server only to restart the program, auto restart it and start it through webpage by using: www.serverdoc.com  program.

Any other form of remote adminning is impossible since the serverconsole is a pretty basic text log, and that's it.

example of dssq and other data harvest facilities: http://www.6thsense.eu/default.php?page=all_online (not all (player) details are available to normal members, but the example is there!wink_o.gif

6th Sense has an auto-administrator & statistics collector for Vietcong1, it even kicks ppl off that rejoin while teamrespawn is enabled, adds time when the time almost runs out and all that kinda stuff smile_o.gif Was a pretty long project to make it do everything we wanted ... but such thing will not be possible with ArmA since the serverconsole is just a log... But I don't know if they built in any rcon (bf2) alike support.....

Share this post


Link to post
Share on other sites

Hmm, the Admin stuff is pretty Poo then. How can you rotate maps, admin players ( kick, ban, change team etc ) ?

Share this post


Link to post
Share on other sites
Hmm, the Admin stuff is pretty Poo  then. How can you rotate maps, admin players ( kick, ban, change team etc ) ?

Admin players... either by voteadmin (would be best, since real admins can override/rule voted-admins), or by leaving the admin password blank (but that would suck tounge2.gif)

But yes, a person must be ingame that is doing it yes.

Besides, in the config files of the server you can put in which maps need to run... Everytime a player joins, the next map gets loaded if the server was empty... or when it was full.. the next map will be loaded after the finishing of this map...

Exactly the same as with OFP smile_o.gif

Share this post


Link to post
Share on other sites

The admin in flashpoints Poo as well though.

As a Squad we preferred non playing admins to keep an eye on things, especially players. We dont like muppets on our servers. If its the same as Flashpoint, you have to play the map when your admin = you die when your typing commands. That looks like a major oversite since the game now supports JIP. Hope BIS can patch that to improve it.

Share this post


Link to post
Share on other sites
The admin in flashpoints Poo as well though.

As a Squad we  preferred non playing admins to keep an eye on things, especially players. We dont like  muppets on our servers. If its the same as Flashpoint, you have to play the map when your admin = you die when your typing commands. That looks like a major oversite since the game now supports JIP.  Hope BIS can patch that to improve it.

You can always not play the map, but be a seagull or in spectator mode, that is just easily built into a mission, that you can make a special spot for such person .. when he takes that spot, he dies at the start and can watch over by spectating or seagull.

Otherwise ur right, if rcon alike stuff really isn't in (Im pretty positive), then it's a shame and I too hope BIS will build some at some point.

Share this post


Link to post
Share on other sites

Based on your first post, I've adapted the RTSQ from WKK's EazyOne for ArmA. It's work-in-progress, but I have a first working version.

I need to check the players part, but have no server available to check it against at the moment. When that works, I'll make a version available.

Share this post


Link to post
Share on other sites
Based on your first post, I've adapted the RTSQ from WKK's EazyOne for ArmA. It's work-in-progress, but I have a first working version.

I need to check the players part, but have no server available to check it against at the moment. When that works, I'll make a version available.

If you query the master server you should be able to receive a list of servers+ports ... maybe there are players on those... Otherwise drop me a PM by tonight, there will probably be users on by then.

I edited phpgstats battlefield vietnam module and converted it for ArmA. The players are displayed correctly now etc. etc.

Altough I myself don't use the skin around it, but integrate into our site. I could share the module probably later tonight or tomorrow.

Share this post


Link to post
Share on other sites

Yes, I'm using gslist to query the master server for games running.

The RTSQ query doesn't work on all of them; I'm assuming that you have to start a dedicated server (like yours?) to actually answer the query. Only two servers so far return a reply, both empty atm.

I'll keep an eye on your server tonight, to see if it's occupied smile_o.gif

Btw: the phpgstats is looking good, workings are similar to the RTSQ, apart from being compatible with a lot more games of course.

Share this post


Link to post
Share on other sites

Ruby looks like a very powerful language, haven't come across it before.

Meanwhile I've found a few occupied servers, so I got the RTSQ to work with player data.

Share this post


Link to post
Share on other sites
I could share the module probably later tonight or tomorrow.

Thanks sickboy!! smile_o.gif That would be great.

Share this post


Link to post
Share on other sites
Gnat @ Nov. 17 2006,14:22)]
I could share the module probably later tonight or tomorrow.

Thanks sickboy!!  smile_o.gif  That would be great.

Ok, here you go: 6thSense Advanced Server Query Script v0.2

I will not give advanced support on it, it should be pretty obvious... smile_o.gif Have fun!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×