久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <small id='NLCsc'></small><noframes id='NLCsc'>

  1. <i id='NLCsc'><tr id='NLCsc'><dt id='NLCsc'><q id='NLCsc'><span id='NLCsc'><b id='NLCsc'><form id='NLCsc'><ins id='NLCsc'></ins><ul id='NLCsc'></ul><sub id='NLCsc'></sub></form><legend id='NLCsc'></legend><bdo id='NLCsc'><pre id='NLCsc'><center id='NLCsc'></center></pre></bdo></b><th id='NLCsc'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='NLCsc'><tfoot id='NLCsc'></tfoot><dl id='NLCsc'><fieldset id='NLCsc'></fieldset></dl></div>
    <legend id='NLCsc'><style id='NLCsc'><dir id='NLCsc'><q id='NLCsc'></q></dir></style></legend>

      <bdo id='NLCsc'></bdo><ul id='NLCsc'></ul>

      <tfoot id='NLCsc'></tfoot>

      帶有數據庫的國家/地區的 IP 地址

      Ip address to country with database(帶有數據庫的國家/地區的 IP 地址)

          <small id='X80oo'></small><noframes id='X80oo'>

            <bdo id='X80oo'></bdo><ul id='X80oo'></ul>
            <legend id='X80oo'><style id='X80oo'><dir id='X80oo'><q id='X80oo'></q></dir></style></legend>
              <tbody id='X80oo'></tbody>

            • <i id='X80oo'><tr id='X80oo'><dt id='X80oo'><q id='X80oo'><span id='X80oo'><b id='X80oo'><form id='X80oo'><ins id='X80oo'></ins><ul id='X80oo'></ul><sub id='X80oo'></sub></form><legend id='X80oo'></legend><bdo id='X80oo'><pre id='X80oo'><center id='X80oo'></center></pre></bdo></b><th id='X80oo'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='X80oo'><tfoot id='X80oo'></tfoot><dl id='X80oo'><fieldset id='X80oo'></fieldset></dl></div>
              <tfoot id='X80oo'></tfoot>
              1. 本文介紹了帶有數據庫的國家/地區的 IP 地址的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我已下載 ip-to-country.csv,其中包含映射到國家/地區的 IP 范圍.我應該如何將這些數據存儲到數據庫中,如何查詢 IP 地址在什么范圍內才能知道 IP 地址來自哪里?

                I have downloaded ip-to-country.csv that has ip ranges that are mapped to countries. How should I store this data to database and how can I query in what range Ip address is to know where Ip address is coming from?

                推薦答案

                我寫了一個小庫,叫做 ip2c 做到這一點.它使用來自 webhosting.info 的數據庫,但也支持來自 Software77.

                I wrote a small lib called ip2c to do just that. it uses the database from webhosting.info but also supports that from Software77.

                它將 CSV 信息轉換為緊湊的二進制格式,并且可以直接在文件、內存或內存映射文件中進行搜索.

                It converts the CSV info a compact binary format and can do the search straight on the file, in memory or in a memory mapped file.

                Java API 用法類似:

                The Java API usage is similar to this:

                String ip = 85.64.225.159;
                int caching1 = IP2Country.NO_CACHE;  // Straight on file, Fastest startup, slowest queries
                int caching2 = IP2Country.MEMORY_MAPPED; // Memory mapped file, fast startup, fast queries.
                int caching3 = IP2Country.MEMORY_CACHE; // load file into memory, slowerst startup, fastest queries
                IP2Country ip2c = new IP2Country(caching1);
                Country c = ip2c.getCountry(ip);
                if (c == null)
                {
                        System.out.println("UNKNOWN");                          
                }
                else
                {
                        // will output IL ISR ISRAEL
                        System.out.println(c.get2cStr() + " " + c.get3cStr() + " " + c.getName());      
                }
                

                這篇關于帶有數據庫的國家/地區的 IP 地址的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                How to convert Integer to int?(如何將整數轉換為整數?)
                How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創建一個隨機打亂數字的 int 數組)
                Inconsistent behavior on java#39;s ==(java的行為不一致==)
                Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)
                <legend id='SKNnO'><style id='SKNnO'><dir id='SKNnO'><q id='SKNnO'></q></dir></style></legend>

                  <tfoot id='SKNnO'></tfoot>

                    <tbody id='SKNnO'></tbody>
                • <small id='SKNnO'></small><noframes id='SKNnO'>

                          <bdo id='SKNnO'></bdo><ul id='SKNnO'></ul>
                          <i id='SKNnO'><tr id='SKNnO'><dt id='SKNnO'><q id='SKNnO'><span id='SKNnO'><b id='SKNnO'><form id='SKNnO'><ins id='SKNnO'></ins><ul id='SKNnO'></ul><sub id='SKNnO'></sub></form><legend id='SKNnO'></legend><bdo id='SKNnO'><pre id='SKNnO'><center id='SKNnO'></center></pre></bdo></b><th id='SKNnO'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='SKNnO'><tfoot id='SKNnO'></tfoot><dl id='SKNnO'><fieldset id='SKNnO'></fieldset></dl></div>
                        • 主站蜘蛛池模板: 人人艹人人 | 国产成人免费视频网站视频社区 | 在线观看中文字幕dvd播放 | 中文字幕一区二区三区在线观看 | 精品福利视频一区二区三区 | 成人三级在线观看 | 99久久婷婷国产综合精品电影 | 丁香六月激情 | 一级高清视频 | 91av在线视频观看 | 久久一 | 国产一区二区三区免费 | 国产高清美女一级a毛片久久w | www.日韩高清| 国内毛片毛片毛片毛片 | 夜夜骑首页| 欧美日韩国产在线 | 一区二区免费在线 | 超碰在线播 | 天堂男人av | 日韩三级精品 | 精品视频国产 | 99久久成人 | 精品国产欧美一区二区三区成人 | 亚洲精品日韩在线 | 国产亚洲精品久久久久久牛牛 | 亚洲色图图片 | 国产一区 | 国产精品久久久久久久久久免费看 | 精品一区二区视频 | 国产精品色综合 | 伊人二区| 91九色网站 | 日韩久久久久久久久久久 | 中文字幕 在线观看 | 北条麻妃99精品青青久久 | 黄视频欧美| 91视频在线 | 久久精品一区二区 | 国产精品日女人 | 亚洲免费片 |