Hi
first of all i would like to say that i'm actually quite un expirienced with php so this may sound like a stupid question to some of you.
here is the deal:
When i Query a game server(in this case a server based on the source netcode[hl2 and cs:s]) with "\xFF\xFF\xFF\xFF\x54" it should return the following data
The return values for 0x54 (A2S_INFO query):
Name
Map
Gamedir (moddir)
Modname
AppID (int16)
Num current clients (int8)
Max clients (int8)
Num bots (int8)
OS (int8)
Passworded (int8)
Secure (int8)
Version String
now i wrote this little script that show me what the server returns (i chose a random server, i hope it is still up and running)
<?php
$fp = fsockopen("udp://67.19.85.3", "27015", &$errno, &$errstr, 10);
fwrite($fp,"\xFF\xFF\xFF\xFF\x54");
$get = fread($fp, 255);
echo $get;
?>
but i can't get all the returned integers displayed....it only displayes everything that is returned as a string.
here is the output:
ÿÿÿÿIHardfought II - [CS: Source - FF is ON]de_dustcstrikeCounter-Strike: Sourcedw2187/1.0.0.11
here is what i was told by a valve person when i asked him about my problem and what the server was supposed to return:
You can't just output it because the values in the return packets aren't valid ASCII chars.
so obviously the question is: how do i get to display the int8 and int16 information?
i really hope somebody can help me with this.
thx,
fischmama