Hi Ian,
The most reliable source is the registries themselves, listed on the
following link
http://en.wikipedia.org/wiki/Country_IP_database
Put consolidating this information from the different sources yourself
is a pain (not to mention ongoing changes), which is why most people
use a provider that has done this for you. There are many to choose
from (free and paid). The reliability comes from keeping your database
up to date.
http://www.google.com/search?q=ip+to+country
A good IP database will have the 4 segment IP addresses converted into
whole numbers for you, then you just search on the number. Using a
single whole number for an IP allows you do to ranges.
To convert a visitor's IP address to a number, you break apart the 4
segments (octets) of the IP address and then do some math to get a
unique whole number.
So my IP address is: 24.222.203.202
Which converts to the following math: (24 * 16777216) + (222 * 65536)
+ (203 * 256) + (202)
Which equals: 417254346
Your database table would look something like the following:
http://www.xmlx.net/stuff/ip-to-country.png
I usually just put the math part in a stored procedure that searches
the table for me, works great.
Hope that helps.
Scott,
On Aug-16-2008, at 11:10 AM, Ian Daniel wrote:
While we're on the subject ... where can one obtain the most
reliable IP
address / country of origin list, to build this intelligence into a
project?
Thanks in advance ...
Ian
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf