Вопрос

Hai friends I need user country when they visit my php website. According to his country I have to do some checking when they upload some bulk informations.

How can I find the visitor country using php.

Это было полезно?

Решение

PHP has no built-in method to determine the location of a website visitor.

The best you can do automatically is to look up their IP address in an IP-to-location database.

You can get one for free from MaxMind. They have a PHP API available for using the database.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top