PDA

View Full Version : Server Query Questions


amw_drizz
03-31-2008, 06:18 PM
Okay I understand that some of you may not understand php code. But I was reading on the dev wiki -> http://developer.valvesoftware.com/wiki/Server_queries (that page in particular) and reading I found that I can send this

\xFF\xFF\xFF\xFFTSource Engine Query\x00 with out the challenge code.

But when start to try and do challenge the to get the code it returns a non number with cancel code in it.

So what would i need to send in order to get player list and server rules? so I can get a valid response back in order to format in to a understandable output.

Marine
04-01-2008, 10:27 AM
So you send this:

http://developer.valvesoftware.com/wiki/Server_queries#A2S_SERVERQUERY_GETCHALLENGE

And it's not sending anyhting back?

amw_drizz
04-01-2008, 01:37 PM
The returned information in the string is

3 74 178 4 that is the ascii code numbers of the string data returned

so translation is 3 = ETX (End of Text) ; 74 = J ; 178 Not there ; 4 = EOT (End of transmission)

I got the data from here http://www.asciitable.com. and said string will not be allowed to be returned to the server so i can get the as2_player list

edit

if you are wondering how i got the ascii chars i added a debug section to my scripts that out puts the acsii char id in dec form.

Epsilon
04-01-2008, 02:37 PM
If I were going to try debugging this, I'd check: make sure you're sending the right data to the server, see if that string of 4 bytes is in fact a 4-byte number of some kind that might mean something, try changing which server you're querying, see if it returns the same value each time.

And if all that doesn't work, see if there's a PHP class available on the 'net that will do the job for you!

amw_drizz
04-01-2008, 02:52 PM
well i am kinda regulated to make this from peices of other scripts and some of my code that i added as most if not all the scripts i have found are a no longer supported / discontinued support in 05 or is not php5 compliant with no intension of upgrading to php5

okay edit

the ascii decode from my debug says this is what i am sending for the challenge requests
255 255 255 255 87

and it is this
\xff\xff\xff\xff\x57

which is the same from here http://developer.valvesoftware.com/wiki/Server_queries#A2S_SERVERQUERY_GETCHALLENGE

amw_drizz
04-03-2008, 11:57 AM
so any more ideas?