Hi anybody has scripts for detecting users' country based on ip?

Recommended Answers

All 5 Replies

The only way I know of doing it is by downloading a database of every ip address and their associated country. But I would be interested to see if there is an automated way of doing it instead of constantly updating an ip database.

Hi vivobie and welcome to DaniWeb :)

I think that the GeoIP PHP extension library can determine country (as well as lots of other locale information). I have never used it, but here is a link to its documentation.

In addition to that do you know how to user google maps or bing maps to display users if ip is given?

Phoogle is a google maps package for PHP. Here is a link to the systemseven website (developers of Phoogle).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.