Answer the question
In order to leave comments, you need to log in
Geo API by ip address?
Recommend a service to determine the city by ip address. One that wakes up to issue the city in 2 languages Rus, Ukr.
I'm going to make a request to get the city through javascript ajax.
Answer the question
In order to leave comments, you need to log in
There was a similar task, only in other languages. The solution was as follows:
1. we will find out the longitude and width by IP
2. Through google / yandex services, etc. Based on geo-data, we are looking for the name of the area in the selected languages.
Only it was a server solution.
By the way, it's not very clear why you'll get information about IP via Ajax. If you need to determine the city of the current user, you can use the geolocation api - it gives the coordinates. If it is necessary to determine the position of the IP address, then it is easier to do this where this IP is defined, i.e. on the server side. Even nginx has an automatic extension from ip to geo. Think about the architecture, it may be more convenient to do it differently.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question