http://ip-to-country.webhosting.info/
They have a downloadable csv file. I have the code in Cold Fusion for it to work, but it's easily reproducrd in WiTango. Rick Sanders Webenergy Canada: 902-431-7279 USA: 919-799-9076 Canada: www.webenergy.ca USA: www.webenergyusa.com -----Original Message----- From: Scott Cadillac [mailto:[EMAIL PROTECTED] Sent: August-16-08 12:56 PM To: [email protected] Subject: Re: Witango-Talk: OT: detecting country of origin 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 ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
