I have a script to get the coordinates of the user when they go to a specific page, but I need a way to get the approximate location (city, state, country, etc.). Is there any way that I do this server side (preferably PHP)?
Check out the Google Maps Reverse Geocoding API .
The options I've found so far
All of them provide simple HTTP endpoints for address extraction, depending on the particular lat / lng combination.
You can also download the geonames database and use the spatial extension of PostGIS or MySQL to create your own service. The advantage is that you donβt have to worry about bet limits. The disadvantage is that it will not be very accurate.
SimpleGeo has no speed limits, but the database is limited to the United States the last time I checked.
Assuming you get lat / long coordinates, you can use something like SimpleGeo services: http://simplegeo.com/
I think the Google option is better, SimpleGeo sounds like more than you need.
Source: https://habr.com/ru/post/1344825/More articles:rails accepts_nested_attributes_for and validation ... Rails 2.3.11 - validationhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1344821/writing-hebrew-in-my-websites-top-menu&usg=ALkJrhhvdOuAAR65fwsre5MfKL4PuNuENAWired animation and two-way snapping issue - wpfPlacing the current date in the text box of a PDF using JavaScript - javascriptJoining three three tables - sqlWhat does "constructors not inherit" mean? - javaWhy is OpenMP slow in this case? - c ++Android Auto-sync with user data - androidHow to change only the eye color in the image (uiimage)? - iosShould I prefer the "is" or "how" operator? - c #All Articles