Jump to content
Sign in to follow this  
_watcher

Server Query Documentation?

Recommended Posts

I was wanting to code my own server query program but have found no documentation on this. Is any publicly available?

Thanks in advance,

_watcher

Share this post


Link to post
Share on other sites

Is there any information about this?

I'm using this query "0xFE,0xFD,0x00,0x04,0x05,0x06,0x07,0xFF,0xFF,0xFF" to get info about server, but since some patch (don't remember exactly which one), this query doesn't provide players info.

Anyone know how to query server for player list?

Edited by MessiahUA

Share this post


Link to post
Share on other sites
Is there any information about this?

I'm using this query "0xFE,0xFD,0x00,0x04,0x05,0x06,0x07,0xFF,0xFF,0xFF" to get info about server, but since some patch (don't remember exactly which one), this query doesn't provide players info.

Anyone know how to query server for player list?

I use the same but players info is included for me.

First I remove \x00\x04\x05\x06\a, then I split at \x00\x00\x00 into array.

At index 0 is all the normal data, and at index 1 is the players data.

Plz excuse the mess; http://dev-heaven.net/projects/six-updater-gui/repository/revisions/develop/entry/SixUpdaterGui/app/six/query/gamespy.rb

Edited by Sickboy

Share this post


Link to post
Share on other sites

I've made some debug and found out, that the problem is in too long mod string (mod hashes), for some reason I get only 1400 bytes and nothing more. If I turn off all mods on server - everything is fine until it fits in 1400 bytes.

Share this post


Link to post
Share on other sites
I've made some debug and found out, that the problem is in too long mod string (mod hashes), for some reason I get only 1400 bytes and nothing more. If I turn off all mods on server - everything is fine until it fits in 1400 bytes.
Perhaps you limit the amount of data you read from the socket somewhere.

Share this post


Link to post
Share on other sites

I've checked everything. Here is simplified php code:

$sock = @fsockopen("udp://".$data["arma_server"], $data["arma_port"], $error_no, $error_str);

$queryString = pack("c*",0xFE,0xFD,0x00,0x04,0x05,0x06,0x07,0xFF,0xFF,0xFF);

fwrite($sock, $queryString);

$reply = fread($sock, 8000);

fclose($sock);

also i tried "while ($line = fgets($sock)) $reply .= $line;", but it hangs if I don't set socket timeout, because for some reason it can't detect eof.

I also checked tcpdump and all i get is one udp packet 1400 length...

:(

Share this post


Link to post
Share on other sites

I ran into this when I started running an ArmA II OA CO server. I think with the 1.59 patch the game query stopped working until I switched to using Gamespy3 protocol.

Share this post


Link to post
Share on other sites

up.

0xFE,0xFD,0x00,0x04,0x05,0x06,0x07,0xFF,0xFF,0xFF packet sending to server:gameport gives no any response. Whats actual packet for 1.59 and how can i get valid query port?

Share this post


Link to post
Share on other sites

any programmer info - ie non php related

c possibly?

or basic ?

i was going to make a friend finder but it seems difficult finding info how the queries/replys are handled.

i know the information is around but i dont want to re-invent the wheel when people allready have the info.

Edited by mobeus

Share this post


Link to post
Share on other sites

Hopefully somebody can help me with this.

For the query of my dedicated servers I've tried

http://www.armaholic.com/page.php?id=243

http://gameq.sourceforge.net/

http://www.greycube.com/site/download.php?view.56

nothing of these works.

Of course the server is online an reachable.

Ports are open too.

Gametracker does tracker the servers but I don't understand why I can't do this?

Could some one tell me what I've to do?

Thanks.

Share this post


Link to post
Share on other sites

gameq2 works you just need to updated it to latest gamespy protocol

GameQ/gameq/protocols/armedassault2oa.php

class GameQ_Protocols_Armedassault2oa extends GameQ_Protocols_Gamespy3
{
   protected $name = "armedassault2oa";
   protected $name_long = "Armed Assault 2: Operation Arrowhead";

   protected $port = 2302;
}

Edited by Dwarden
typo fix

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  

×