A while back I made a simple PHP class named SourceQuery that can send
queries to Source games and HL1
games and returns results in an easy to use way. The class isn't
sophisticated by any means, but does work and should help you.

Here is the class itself:
http://calebd.net/personal/files/sqc.php.txt

And a simple page that uses the class:
http://calebd.net/personal/files/sqc_example.php.txt

Note that some hosts block most outbound connections on all ports but a
few, so a connection to port 27015 would be blocked and the query would
fail.

There is also information on the developer Wiki:
http://developer.valvesoftware.com/wiki/Server_Queries

Good luck. :)


djh wrote:
--
[ Picked text/plain from multipart/alternative ]
Since this is my first message to you people, I would like to say Hello!

Now
to the point: I am trying to make a php site that can display info
regarding some counterstrike 16 servers, and source servers that I own.
So far I only managed to make a simple Online/Offline script, but I
want to display a name, the current map, current/max players, timeleft
nextmap etc.

I am having a hard time finding the right queries to send to hlds and srcds.
The
valve-erc site has a tutorial but it's 3 years old. Other sites have
some more information but none of them seem to be working ( I presume
it's the new hlds and srcds updates ).
A friend of mine told me to capture the actual packets but to be honest it 
looks kind of complicated.

The only things I found are theese:
http://collective.valve-erc.com/index.php?doc=1063146620-20111500
http://www.int64.org/docs/gamestat-protocols/halflife.html
http://www.int64.org/docs/gamestat-protocols/source.html

Thanks for reading, and if someone knows of any tutorials or hints please let 
me know. Thank you.




--

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders







_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to