Domanda

I want to geolocate people from there IP. I know there are services online with an API.

I want to know if there is any way to calculate this data on my own (In other words, is there any way to manually map 192.168.0.1 to (say) New York)?

È stato utile?

Soluzione

First, "calculate" is not the right word for it. There is nothing to calculate, it is simple mapping of IP to location. First, you would have to map IP blocks to ISPs. Then get the location of the ISPs. Manually. This is a huge task, and you need to constantly update the list, especially with IPv6 fast growing.

I see no reason to do the job yourself. There are APIs, use them. Maxmind does a great job at providing accurate information such as country, region, ISP name.

Altri suggerimenti

MaxMind's free GeoLite databases are probably your best bet.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top