5

Possible Duplicate:
How to get the page visitors Country with PHP?

I've been searching everywhere, and I can't seem to find anything. I need a free PHP GeoIP/Ip to country.

All I can find is that it gives me the country and small form of the country. I also would like to have information of possible street or coords, city, and maybe host information?

I need this because I am creating a PHP CMS (for myself and clients) and I want to track ips.

I don't really want an API, I want it like a database. Any ideas ?

Community
  • 1
  • 1
David Tkachuk
  • 116
  • 1
  • 2
  • 7

2 Answers2

5

MaxMind GeoLite database: http://dev.maxmind.com/geoip/geolite OR pay for the full version: http://www.maxmind.com/en/geolocation_landing

They also have php libraries to go with it: http://dev.maxmind.com/geoip/downloadable

As for PHP, checkout GeoIP library and Example geoip_record_by_name()

For a database, you could make your own database overtime... and fill it with cached collected data but I doubt that would be as accurate as MaxMind's data.

There are many other methods you could use and couple them with a custom database or even combine it with the GeoLite db: geoplugin, ipinfodb

Anthony Hatzopoulos
  • 10,437
  • 2
  • 40
  • 57
2

Google is your best friend :).

you should be able to make it yourself with this information (API):

https://ipstack.com/

Rotimi
  • 4,783
  • 4
  • 18
  • 27
Stefan Koenen
  • 2,289
  • 2
  • 20
  • 32