This is an adaptation of a very old code I made a decade ago. It is a class that is able to query/ping game servers including:
It will return different information depending on the server such as : Server description, players online, player list, current map, website, favicon, map download link, etc.
http://alexou.net/pub/?GameServerQuery
Quake 3 Arena query reply:
array(31) { ["roundlimit"]=> string(1) "0" ["capturelimit"]=> string(2) "10" ["g_blueTeam"]=> string(5) "^ADAM" ["g_redTeam"]=> string(4) "^EVE" ["sv_punkbuster"]=> string(1) "0" ["sv_allowDownload"]=> string(1) "1" ["sv_pure"]=> string(1) "0" ["sv_dlRate"]=> string(4) "2048" ["sv_maxRate"]=> string(5) "25000" ["sv_minRate"]=> string(1) "0" ["sv_maxclients"]=> string(2) "20" ["sv_hostname"]=> string(5) "Shost" ["timelimit"]=> string(2) "20" ["fraglimit"]=> string(1) "0" ["version"]=> string(24) "ioq3 1.36 (viol v1.3dev)" ["com_gamename"]=> string(11) "Quake3Arena" ["com_protocol"]=> string(2) "71" ["dmflags"]=> string(1) "0" ["g_gametype"]=> string(1) "4" ["mapname"]=> string(8) "frontier" ["bot_minplayers"]=> string(1) "2" ["g_needpass"]=> string(1) "0" ["gamename"]=> string(13) "excessiveplus" ["Uptime"]=> string(16) "27 days, 5:08:08" ["Info"]=> bool(false) [0]=> bool(false) ["players"]=> array(2) { [0]=> array(3) { ["frag"]=> string(1) "3" ["ping"]=> string(2) "49" ["name"]=> string(6) ""Esco"" } [1]=> array(3) { ["frag"]=> string(3) "135" ["ping"]=> string(2) "86" ["name"]=> string(5) ""KiD"" } } }