How can I get a custom country without querying it for other web services?

I need to develop a similar service (but different):

whatismyipaddress.com

iplocation.net

      

So how can I get the country of the users using their IP and without using external web services?

+3
php


source to share


4 answers


Try Geo IP Location . It uses a standalone database. But it won't be 100% accurate.



+2


source to share


You can use country ip database. you can get it from Maxmind, IP2Location, software77, Maxmind, Geolite, ip2nation. some are free and some are paid. you can buy the database here.



+1


source to share


Well, you always need a third party, you may need to make a dictionary for the countries allocated to the IP ranges and check for each visit to its range. It will also be inaccurate 100%, but possibly 95%. The website that gives ip ranges starts at: https://www.countryipblocks.net/country_selection.php

0


source to share


Below are two free databases commonly used by developers.

IP2Location LITE

http://lite.ip2location.com

GeoLite2

http://dev.maxmind.com/geoip/geoip2/geolite2/

Both are required attributes to use.

0


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics