Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top