QueriEd is a Java library for querying server and player info from some popular game servers
Here is some example code on how to use the library. This code is included in the package as Demo.java
package net.sourceforge.queried; import java.util.ArrayList; import java.util.Iterator; public class Demo { public static void main(String[] args) { // GG CS 194.29.194.31:27015 check("HL", "194.29.194.31", 27015); check("HL", "212.112.129.13", 27028); check("HL", "212.112.129.13", 27027); // LK 129.242.32.199:14567 check("BF", "129.242.32.199", 23000); // jolt bfv (06) check("BFV", "213.208.119.142", 23000); // gg - ET check("ET", "grave.netsonic.fi", 27960); check("ET", "62.4.74.235", 30200); // CoD check("COD", "195.20.108.173", 28960); check("COD", "195.20.108.173", 28961); // Quake 3 check("Q3", "212.110.165.69", 27961); check("Q3", "67.105.233.39", 27960); // UTs check("UT", "213.201.220.12", 7778); check("UT2003", "82.165.33.64", 8898); check("UT2004", "193.195.76.213", 7787); // D3 check("D3", "24.247.149.124", 27666); check("D3", "203.96.92.66", 28666); } private static void check(String gameType, String ip, int port) { System.out.println("ServerInfo ["+ gameType +"]:"); ServerInfo serverInfo = QueriEd.serverQuery(27777, gameType, ip, port); if(serverInfo == null) { System.out.println("ServerInfo == null"); } else { System.out.println(serverInfo.getName() +" :: IP: "+ serverInfo.getIp() +":"+ serverInfo.getPort() +" :: "+ serverInfo.getGame() +" :: Map: "+ serverInfo.getMap() +" :: Players: "+ serverInfo.getPlayerCount() +"/"+ serverInfo.getMaxPlayers()); } System.out.println("PlayerInfo:"); ArrayList playerInfo = QueriEd.playerQuery(27777, gameType, ip, port); if(playerInfo != null && playerInfo.size() > 0) { Iterator iter = playerInfo.iterator(); int count = 0; while(iter.hasNext()) { PlayerInfo pInfo = (PlayerInfo) iter.next(); if(count > 0) { System.out.print(", "); } count++; System.out.print(pInfo.getName() +" ["+ pInfo.getScore() +"/"+ pInfo.getKills() +"/"+ pInfo.getDeaths() +"]"); } } else { System.out.println("No players"); } System.out.println(""); System.out.println(""); } }