Answer the question
In order to leave comments, you need to log in
Price substitution depending on the user's ip?
Hello everyone, I have a small question about the implementation of some functionality on the site.
There is a site where you need to substitute the price depending on the location of the user.
There is a select in which there are 3 points:
1. Russia
2. Europe
3. The rest
And depending on which point is selected and the price is set.
So I found such an api as Sypex Geo, I can make an ajax request to it and get the country code, but it doesn’t display what part of the world it is, sorting through all the countries of Europe doesn’t look very good, so maybe someone knows another API where you can get the user's country and belonging to Europe?
Answer the question
In order to leave comments, you need to log in
Try the API from BigDataCloud.com . This service returns administrative and geographic data.
If you had the client's coordinates, then you could use their free service: Free Reverse Geocoding API
If you still want to determine it by IP, then this is also possible:
IP-Address geolocation API
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question