W
W
WebDev2019-02-08 13:35:22
Geolocation
WebDev, 2019-02-08 13:35:22

Is it possible to calculate the country by IP address without using third-party services?

When entering the site, we collect statistics, including the IP address. Further, using this IP address, we determine the user's country and display statistics by country.
To determine the country, we make requests to ipinfodb.com. There are a lot of visitors and from time to time most of the data is not loaded. Apparently, there are some restrictions and limits for this service.
Is it possible to determine the user's country without resorting to third-party databases?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Ninazu, 2019-02-08
@kirill-93

Download the database and use it locally
https://dev.maxmind.com/geoip/geoip2/geolite2/

E
Evgeny Nikolaev, 2019-12-13
@nikolaevevge

Check out this library blog.ivru.net/?ip=82

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question