Re: extracting the root domain from a URL [message #171644 is a reply to message #171643] |
Thu, 13 January 2011 23:26 |
Mike
Messages: 18 Registered: December 2010
Karma:
|
Junior Member |
|
|
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
|
|
|