eldy / AWStats

AWStats Log Analyzer project (official sources)
https://www.awstats.org
370 stars 120 forks source link

Support IP2Location LITE Database #102

Open m-cameron opened 6 years ago

m-cameron commented 6 years ago

I wonder if awstats has plan to support the free IP2Location LITE database. I found it faster than existing geolocation library and has all countries results (no EU, AP etc.).

visualperception commented 6 years ago

Location by IP is inaccurate. IP usually returns the location of the service provider and not the end user. At least that is true for europe. I don't know if its more accurate in the US and elsewhere but I doubt it. Consider for example that many Service providers use dynamically allocated IP numbers for their users. How do you think that could be accurate when the lookup for IP 2 location is held in a static database which is only updated once a month? The lookup would need to be on a realtime database to be anywhere near accurate so I wonder why people like to use IP2location lookups. They are just plain inaccurate. Also for users with static IPs the service providers don't update the location in the iana database to be the users location. The location will be where the service providers servers are locataed which may be hundreds of miles away from where the user is located.

visualperception commented 6 years ago

try your IP at the following website and see which one if any has the correct location? And explain why they (probably) are all different if you aren't located in a major urban region such as London. I live in the Southwest of the UK. 5 of the results are hundreds of mile away from me. Only one is close and that is via a paid for service that seems to be doing lookups from BT/Openreach and finding an exchange in a neighbouring town but not where I live. And that service can not cope with dynamically allocated IPs.

https://www.iplocation.net/

m-cameron commented 6 years ago

You are right. It is not perfect but it is good enough for web log analysis purpose.

visualperception commented 6 years ago

It's not good enough if you are making business decisions based on it.