2

I want to know what is the best package to detect country which user is visiting from?

I am using php/mysql..

Naveed
  • 41,517
  • 32
  • 98
  • 131
Padmanabha Vn
  • 624
  • 1
  • 14
  • 33

2 Answers2

1

You can download the MaxMind GeoLite Country database, and use that to lookup the IP of user to determine their country.

There are paid versions of that database, but I've found the accuracy of the free database more than sufficient.

AgentConundrum
  • 20,288
  • 6
  • 64
  • 99
1

I think there is not a guaranteed way but there are some options:

Naveed
  • 41,517
  • 32
  • 98
  • 131
  • 1
    I had no idea this was already baked into PHP. It looks like it's designed as an interface to MaxMind's DB, is that right? – AgentConundrum Dec 16 '10 at 07:09
  • Are you talking about GeoIP? I think you are right. I found some MaxMind link on this page: http://www.php.net/manual/en/geoip.setup.php – Naveed Dec 16 '10 at 07:13