...

View Full Version : Free IP location database(s)? Help me to choose



mudassir
01-15-2012, 08:25 PM
Hi there,

I'm working on my own site that is planned to display/hide contents depending on the country of a visitor. To detect the country of a visitor, I'm planning to use MaxMind's GeoIP Country (Lite version) Database. I've downloaded their latest database and tried it as well. But I'm confused regarding the results because the other databases, like, IP Legence, World IP and ip2country are producing different results while solving an IP.

Among GeoIP, IP Legence, World IP and ip2Country, the first one "GeoIP" seems most reliable. Please help me to select the best one with your experiences. Thanks!

mudassir
01-16-2012, 02:32 AM
Only one response out of 56 views????
Should I consider this low-response rate?

Come on guys share your experience.

12k
01-16-2012, 02:50 AM
I have always used the meta data from geobytes. But i would recommend doing your own just because if their site is down, that would make urs useless. That or atleast setup a backup url to load the data from if the first fails.



<?php
$tags = get_meta_tags('http://www.geobytes.com/IpLocator.htm?GetLocation&template=php3.txt&IpAddress='.$_SERVER['REMOTE_ADDR']);
foreach($tags as $key => $value)
{
echo "[".$key."] => [".$value."]<br/>";
}
?>


#ps: but dont get pushy -.-

tangoforce
01-16-2012, 03:52 PM
Only one response out of 56 views????
Should I consider this low-response rate?

Come on guys share your experience.

Out of 56 views, how many people do you think will:

Even use IP location in their code
Have tried all of the services you've listed
Have in depth experience in the field


Many of the visitors here come here for problem solving because they are newbies. I'd say about 1/8 of the people on this forum on a regular basis are 'decent' coders so out of those 56 views, 1/8th might be decent enough to comment - 7 people. Of those, how many do you think will have the answers you seek? I would be doubtful that all 7 people have used IP location features in their programs.

_Aerospace_Eng_
01-16-2012, 04:02 PM
I've only ever used MaxMind. It worked fine for what I was doing. I was only getting the user's country at the time. What I would do is try to locate the user's city using all 3 services and then comparing the results. For example service 1 returned city1 and service 2 returned city1 but service 3 returned city2 then it might be safe to say that city1 is the user's city. Of course all of this might be moot because an IP address some times can go back to the ISP headquarters which could be across the country. The main issue with MaxMind GeoIP Lite is having to get the latest updated database. This can be simple enough though with a cron job that pulls the latest tar file every so often.

felgall
01-16-2012, 08:12 PM
You might consider using JavaScript to try to determine their location. If they have geolocation enabled in their browser and if the device their browser is on has GPS then you can obtain their exact current position rather than relying on the IP address which at best identifies the closest access point provided by their ISP. The JavaScript version automatically falls back to using geoip if a more accurate method isn't available and you could build in your own fallback to the server side method for when the JavaScript option isn't available.

mudassir
01-16-2012, 11:14 PM
I have always used the meta data from geobytes. But i would recommend doing your own just because if their site is down, that would make urs useless. That or atleast setup a backup url to load the data from if the first fails.

#ps: but dont get pushy -.-

Thanks for your feedback. GeoBytes is one of the first companies to provide IP data. I've never tried their services, all I know is that they allow 20 queries / hour for free. What if you exceed the limit, what is returned back, an Error, a Message, or Nothing?

mudassir
01-17-2012, 06:41 PM
I've only ever used MaxMind. It worked fine for what I was doing. I was only getting the user's country at the time. What I would do is try to locate the user's city using all 3 services and then comparing the results. For example service 1 returned city1 and service 2 returned city1 but service 3 returned city2 then it might be safe to say that city1 is the user's city. Of course all of this might be moot because an IP address some times can go back to the ISP headquarters which could be across the country. The main issue with MaxMind GeoIP Lite is having to get the latest updated database. This can be simple enough though with a cron job that pulls the latest tar file every so often.

Thanks buddy, the solution you suggest is having 5 star rating out of 5. Cross checking is the best way ever. I also have to cross-check the results out of all four dbs. But to gain more meaningful results, I've to rank the dbs.

What I've done is I ranked MaxMind 1st, Ip2Legence 2nd, World IP 3rd and Ip2Country 4th depending on the accuracy level, as I tested. The second thing I've done is I've extracted duplicate entries from all four dbs. Now in my GeoIP db there are 155,183 records, 49623 records in IPL, 39907 in WIP and 2665 in IP2C.

Rating system of the dbs I've defined is:

44/100 - GeoIP
25/100 - IPLegence
21/100 - WorldIP
10/100 - IP2Country

Now while solving an IP address, the result having highest rating is selected. Like GeoIP says US, IPLegence says CN, WorldIP says CN and IP2Country says FR. The results will be ranked US (44%), CN (46%), FR (10%); only if there is a variation.

But the issue is that I want to block 2 countries (India, China), from where my products are being pirated. And the visitors from rest of the world are important from me, especially from US, Europe, Arabian Countries and Australia.

Even though I want to block visitors from two countries, I don't want to take any chance for any of my customer from US, Europe, Arab World and Australia. So, what I've done to solve this issue is that if the final resulted country is IN or CN, and GeoIP says it is not; I'll go for GeoIP and let the visitor browse my site.

For any such calculations, it will always be important to me to rank the dbs correctly to gain more and more reliable results. I wish that my community members will keep on voting the best ip dbs in their experience and the thread will be helpful for others also.

mudassir
01-17-2012, 06:50 PM
Out of 56 views, how many people do you think will:

Even use IP location in their code
Have tried all of the services you've listed
Have in depth experience in the field


Many of the visitors here come here for problem solving because they are newbies. I'd say about 1/8 of the people on this forum on a regular basis are 'decent' coders so out of those 56 views, 1/8th might be decent enough to comment - 7 people. Of those, how many do you think will have the answers you seek? I would be doubtful that all 7 people have used IP location features in their programs.

Yes, you're correct. But the reason of being impatient is also important to me and I want help of other community members for its solution. As I've described in my last post, my products are being pirated from India and China. I want to block visitors from these two countries as I've no customer of my products from there but the rest of world is important to me. I don't want to take any chance but the fact is that I'M IN A BIG TROUBLE.

tangoforce
01-17-2012, 07:16 PM
But the reason of being impatient is also important to me

I can understand that but it doesn't change anything that I've explained - if there aren't enough people here with experience of it, then you won't get many answers.

mudassir
01-17-2012, 08:24 PM
I can understand that but it doesn't change anything that I've explained

:) I agree

tangoforce
01-17-2012, 10:11 PM
You might be able to block incoming connections based upon the accepted language codes that the browser may send.

Never tried it but that may help you.

_Aerospace_Eng_
01-18-2012, 07:06 AM
Also users could use proxies that aren't China or India based so they would get around your GeoIP checking.

chrislim2888
03-26-2012, 10:25 AM
I will opt for paid version for accuracy, like http://www.ip2location.com

johnpon
03-26-2012, 01:31 PM
In our site we use MaxMind's GeoIP PRO.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum