API Questions on Kentico API.
Version 5.x > API > IP2CountryHelper View modes: 
User avatar
Member
Member
jhart-theatomgroup - 9/3/2013 8:45:46 AM
   
IP2CountryHelper
I am using the IP2CountryHelper to block non US users from seeing prices. It seems that some international IPs are returning null from the GetCountryByIp method. I have the latest IP-2-Country release so I was just wondering why would some IPs return null? If its null can I assume its international or will this happen for US Ips as well?

User avatar
Member
Member
kentico_sandroj - 9/3/2013 11:50:45 AM
   
RE:IP2CountryHelper
Hello,

That depends on the IP2Country database(s) that you are using, they vary in accuracy. Using multiple databases may help.
How accurate is IP GeoLocation?
IP Address GeoLocation database has over 98% of accuracy in country and ISP level, 75% in region level and 63% in city level.

You could find free add-on databases such as this one but you should do some research and make sure it is appropriate for your requirements.

User avatar
Member
Member
jhart-theatomgroup - 9/3/2013 1:02:34 PM
   
RE:IP2CountryHelper
How does using multiple databases work with conflicting IP addresses?

User avatar
Member
Member
jhart-theatomgroup - 9/3/2013 2:31:20 PM
   
RE:IP2CountryHelper
Actually I may have another problem entirely. Every IP address I test with is returning null from the IP2CountryHelper. This might explain why test IPs that worked fine when I originally implemented this no longer work. I have updated the ip2country.dat file but still get nothing but nulls. Any idea what could cause this?

User avatar
Member
Member
kentico_sandroj - 9/5/2013 11:08:01 AM
   
RE:IP2CountryHelper
Hello,

Did you have this issue before updating the .dat file? Also, how are you testing the IPs? How could we reproduce the issue? Any chance you could upload the .dat file?

Is upgrading an option for you? We are using a much better library in version 7.