2

I have a website where I want to find out visitor's country from his IP address. There are some databases of country's IPs range that can be used. when I download them to my database, should I be woried about some changes made in future? How often are IP's range for countries actualized?

Paul
  • 61,193

2 Answers2

1

IP addresses, postcodes, and the like, were not invented to directly encode geographical locations. That is, simply, not their purpose.

These things do change, and as you can see they change often enough for people to spot quite large errors from year to year. They also were never intended to represent countries in the first place. They represent the topgraphy of Internet network connections, not physical geography.

Then of course you have the difference between the end user's IP address and the back end of the HTTP proxy's IP address, on top of all that.

Further reading

JdeBP
  • 27,556
  • 1
  • 77
  • 106
0

I think you'd be better off using a geoip service that already exists rather than putting your own together - that way you don't need to concern yourself with maintaining the database.

An example is here, but there are many out there.

Paul
  • 61,193