Frage

So, I was told in my previous question that I can use the databases provided by MaxMind to determine locations.

So, I got their databases downloaded from their site. They are csv files and open up in Excel.

InetAddress ip = InetAddress.getLocalHost() is how I get the IP of my computer. From there I do String justIP = ip.getHostAddress()

My question is:

  • How do I resolve justIP to a city location using the DB I just downloaded ???

  • I am new to this so a little help will be appreciated.

    One of the files has three columns. startIPNum, endIPNum and locID I do not know what these do but I guess locID maps to a city and country location in the other file.

    War es hilfreich?

    Lösung

    Did you tried the Java examples from Maxmind? http://dev.maxmind.com/geoip/downloadable#Java-8
    And see http://dev.maxmind.com/geoip/csv for field descriptions

    Lizenziert unter: CC-BY-SA mit Zuschreibung
    Nicht verbunden mit StackOverflow
    scroll top