package for detecting users contry in php? [closed]
I want to know what is the best package to detect country which user is visiting from? I am using php/mysql.. I think there is not a guaranteed way but there are some options: You can use GeoIP You can check the HTTP_ACCEPT_LANGUAGE header( $_SERVER ) Use any IP-To-Country database 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. 来源: https://stackoverflow.com/questions/4457920/package-for-detecting-users-contry