Method Geography.Countries.from_domain()


Method from_domain

Country from_domain(string domain)

Description

Look up a country from a domain name. Returns zero if the domain doesn't map to a country. Note that there are some valid domains that don't:

INT

International

MIL

US Military

NET

Network

ORG

Non-Profit Organization

ARPA

Old style Arpanet

NATO

Nato field

And that US has five domains, Great Britain and france two: <dl compact> <dt>EDU <dd>US Educational <dt>MIL <dd>US Military <dt>GOV <dd>US Government <dt>UM <dd>US Minor Outlying Islands <dt>US <dd>US <dt>GB <dd>Great Britain (UK) <dt>UK <dd>United Kingdom <dt>FR <dd>France <dt>FX <dd>France, Metropolitan <dt>There's also three domains that for convinience maps to US: <dt>NET <dd>Network <dt>ORG <dd>Organization <dt>COM <dd>Commercial </dl>


Method from_domain

Country from_domain(string name)

Description

Look up a country from its name or aka. The search is case-insensitive but regards whitespace and interpunctation.