FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » extracting the root domain from a URL
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: extracting the root domain from a URL [message #171648 is a reply to message #171644] Fri, 14 January 2011 07:51 Go to previous messageGo to previous message
Luuk is currently offline  Luuk
Messages: 329
Registered: September 2010
Karma:
Senior Member
On 14-01-11 00:26, Mike wrote:
> I thought .com, .asia, etc. was the "TLD". What would you call the
> 'site.com' or 'site.co.uk' portion of the url? Regardless of the
> name, can you suggest an effective and accurate way to extract it?
>
> In the domain names that use an extra part of the name (e.g.,
> 'site.com.tw' or 'site.co.uk'), I've only ever seen 'com' and 'co'
> used that way. I guess I could check if that center part is 'com' or
> 'co' rather than checking to see if it's strlen() > 3. Though, I'm
> not sure if that's all folks are using. I wonder if there are any
> published conventions for it?
>
> Mike
>

All TLD names are listed here:
http://www.icann.org/en/registries/top-level-domains.htm

For site.co.uk, the tld-name listed is .uk
read http://en.wikipedia.org/wiki/.uk which explains why its not .gb and
why co.uk is used...

--
Luuk
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: printing for dot matrix printers
Next Topic: having better solution to promote your products.
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 11:22:56 GMT 2024

Total time taken to generate the page: 0.05377 seconds