What is the best PHP geolocation class? #geolocation
Edit
by pradeep - 9 years ago (2016-01-05)
Find city and country name by IP
| I want to find the city by the IP address of the user. |
Ask clarification
2 Recommendations
Very Simple IP Details: Get IP address location and Google Maps image
This class can get IP address location and Google Maps image.
It can send a HTTP request to the IPInfo.io API to get the geographic location details of a given IP address. Currently it can obtain IP address country code, region, city, postal code, latitude, longitude, hostname and organization.
The class can also return HTML to embed a static image from Google Maps showing the geographic location of the IP address.
| by zinsou A.A.E.Moïse package author 6835 - 7 years ago (2017-08-20) Comment
this could help too... |
IP2Location PHP Module: Get geographical details of an IP with IP2Location
This class can get geographical details of an IP with IP2Location.
It can read and parse an IP2Location data file made available in the IP2Location site, so it can locate a given IP address and get geographical details associated to the IP address range.
Currently it can extract details like the country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection speed, IDD code, area code, weather station code, weather station name, mcc, mnc, mobile brand, and elevation.
This class can work with both the commercial and free versions of IP2Location database.
| by Manuel Lemos 26695 - 9 years ago (2016-01-19) Comment
This class can get the IP country and approximate city using IP2Location data file. Technically it works like describe on this article.
There is also a solution based on a Web service described in this article. |