import com.handsome.ip.IPSeeker;
/**
* @author shiyz
* @creation date 2012-10-24 下午3:48:25
*
*/
public class Test{
public static void main(String[] args) {
System.out.println(getIpLoaction("220.234.244.5"));
}
public static String getIpLoaction(String ip){
String ipFile="QQWry.Dat";
String ipPath="E://";
IPSeeker ips=new IPSeeker(ipFile,ipPath);
//获得地区
String address = ips.getIPLocation(ip).getCountry();
String area = ips.getIPLocation(ip).getArea();
return address + " " + area;
}
}
http://download.csdn.net/download/shiyuezhong/4683674