通过Ip查询对应地址,Ip2location全球IP地址网段

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

通过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
更多请参考
官网下载资料
下载对应的全球IP段文件

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(
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值