PHP Classes

What is the best PHP geolocation class?: Find city and country name by IP

Recommend this page to a friend!
  All requests RSS feed  >  What is the best PHP geolocation class?  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

What is the best PHP geolocation class?

Edit

Picture of pradeep by pradeep - 9 years ago (2016-01-05)

Find city and country name by IP

This request is clear and relevant.
This request is not clear or is not relevant.

+4

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.
This recommendation solves the problem.
This recommendation does not solve the problem.

+1

Picture of zinsou A.A.E.Moïse by zinsou A.A.E.Moïse package author package author Reputation 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.
This recommendation solves the problem.
This recommendation does not solve the problem.

+3

Picture of Manuel Lemos by Manuel Lemos Reputation 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.


Recommend package
: 
: