in reply to TLD lookup

Since the country codes are fixed by an ISO standard, methinks a persistent cache might be appropriate.

Replies are listed 'Best First'.
Re: Re: TLD lookup
by mdillon (Priest) on Nov 23, 2000 at 08:01 UTC
    the standard in question is ISO 3166.

    ccTLDs don't correspond directly to the codes in ISO 3166, since a registrar must petition ICANN to add it to the root zone. however, the code basically has to be in ISO 3166 for ICANN to approve it as a ccTLD, so keeping the whole ISO 3166 list around would be a good way to definitively look up any possible ccTLD.

    also, that standard does change a few times every couple of years. for instance, Western Samoa (WS) was recently changed from "Independent State of Western Samoa" to "Independent State of Samoa". more recently, "Occupied Palistinian Territory" (PS) was added (it actually also was subsequently granted a ccTLD which was added to the root.zone within the last few months).

Re: Re: TLD lookup
by arturo (Vicar) on Nov 27, 2000 at 00:24 UTC

    Oh, yeah, this was totally a quick "hack it up on a Friday afternoon" exercise (well, Wednesday, which in the US this particular week was a Friday) Note the almost complete lack of error handling and research behind it. But it works pretty well, for all that.

    I was thinking of it more as a "look what you can put together in Perl in five minutes" demonstration. One could regard it as something to build on =)

    Philosophy can be made out of anything. Or less -- Jerry A. Fodor