通过Ip查询对应地址,Ip2location全球IP地址网段
1. Ip2location介绍
Ip2location IP 库 是比较准确的 在 免费查询IP 行列, 有很多的地址段, 有 Ip 详情等级 如 国家, 国家 城市, 国家 城市 经纬度, 邮编等 , 已做过大量IP 测试 测试数据
IP测试数据全球IP1000个
测试结果
未查询到的IP数量:0
查询到的国家-------------------------------
国家=Myanmar,数量=1258
国家=Japan,数量=1
国家=China,数量=4
国家=Malaysia,数量=1
国家=Thailand,数量=1
查询到的城市-------------------------------
城市=Shwebo,数量=21
城市=Thayetmyo,数量=2
城市=Pyay,数量=12
城市=Thanatpin,数量=10
城市=Haka,数量=14
城市=Pakokku,数量=1
城市=Meiktila,数量=25
城市=Taunggyi,数量=22
城市=Hpa-An,数量=9
城市=Yamethin,数量=11
城市=Skudai,数量=1
城市=Mandalay,数量=88
城市=Kamphaeng Phet,数量=1
城市=Shenzhen,数量=4
城市=Monywa,数量=25
城市=Yangon,数量=508
城市=Mawlamyinegyunn,数量=7
城市=Syriam,数量=40
城市=Pathein,数量=9
城市=Maymyo,数量=20
城市=Bogale,数量=6
城市=Lashio,数量=336
城市=Pyu,数量=33
城市=Magway,数量=31
城市=Mogok,数量=8
城市=Nay Pyi Taw,数量=20
城市=Niigata,数量=1
2. 使用
准备资料: 需要能够FQ
官网 : LINK
国家 城市 ip : LINK
更多请参考


3.java代码解析
public class IPIntervalStoreBean {
// 开始 IP
private String ip;
// 国家简单代码
private String countrySim;
// 国家名称
private String country;
// 城市名称
private String city;
// 经度
private long lng;
// 纬度
private long lat;
public IPIntervalStoreBean(String ip, String countrySim, String country, String city,long lng,long lat) {
this.ip = ip;
this.countrySim = countrySim;
this.country = country;
this.city = city;
this.lng = lng;
this.lat = lat;
}
public IPIntervalStoreBean() {
}
public static String toLogStoreString(IPIntervalStoreBean ipBean) {
StringBuffer res = new StringBuffer();
if (ipBean == null) {
res.append("ip=").append(

本文详细介绍IP2Location全球IP地址网段查询工具,包括其准确性、查询范围及使用方法。IP2Location提供国家、城市、经纬度等详细信息,适用于IP定位需求。文章包含Java代码实现IP查询功能。

203

被折叠的 条评论
为什么被折叠?



