2 Letter Country Codes

General Discussion about IP Address Lookup caveats, technology, ideas, etc.

Moderator: Moderators

2 Letter Country Codes

Postby hairyal on Thu Mar 01, 2007 8:12 am

Hi,

Just wondering if the two letter country codes (e.g. US for the United States) given by api.hostip.info/country.php follow any particular standard, or if they are proprietary. I thought perhaps they might follow ISO 3166-1 alpha-2, but was hoping for confirmation/denial of this.

Thanks,

Hai
hairyal
n00b
 
Posts: 2
Joined: Thu Mar 01, 2007 7:16 am

Postby robocoder on Fri Mar 02, 2007 12:54 am

Generally, yes, it's ISO3166. But there are specific cases where obsolete or invalid codes are used, largely because the source of the information (the various NICs or the netblock owner) don't validate or update it.

Examples: AP (Asia Pacific), EU (European Union), UK (instead of GB), YU, etc.
User avatar
robocoder
Veteran
 
Posts: 105
Joined: Sat Mar 25, 2006 8:10 pm
Location: Ontario, Canada

Postby hairyal on Fri Mar 02, 2007 11:30 am

Cool - I had noticed GB, hence the question. Do you have a complete list of which codes don't match the ISO standard?
hairyal
n00b
 
Posts: 2
Joined: Thu Mar 01, 2007 7:16 am

Postby jyunker on Mon Apr 09, 2007 2:51 pm

Try this: http://www.iana.org/root-whois/index.html

They keep a current list of country codes.
John Yunker
jyunker
n00b
 
Posts: 1
Joined: Mon Apr 09, 2007 2:49 pm

2 digit country code

Postby RobMeadows on Wed Feb 06, 2008 9:32 am

Am I able to pull the 2 digit country code into my web site as a variable. Eg.:

You are in "US"
RobMeadows
n00b
 
Posts: 1
Joined: Wed Feb 06, 2008 9:26 am


Return to IP Address Lookup

Who is online

Users browsing this forum: No registered users and 2 guests

cron