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 #171652 is a reply to message #171642] Fri, 14 January 2011 08:43 Go to previous messageGo to previous message
alvaro.NOSPAMTHANX is currently offline  alvaro.NOSPAMTHANX
Messages: 277
Registered: September 2010
Karma:
Senior Member
El 13/01/2011 22:50, Mike escribió/wrote:
> Does someone know of a way to do this even with three letter domain
> names?
[...]
> if( isset($parts[2])&& strlen($parts[1])> 3) { unset($parts[2]); }

It'd dare say it's 3 because you hard-coded a 3 in your code.

Whatever, as Denis already explained, the number of parts in domains you
can buy do not follow any mathematical rule. E.g.: you can register
"example.es", "example.nom.es" and "example.co.uk" but not
"example.nom.uk" or "example.co.es".

The only way to do it off-line is to compile a full list from all
registrers around the world and keep it updated as the rules are being
changed across time.


--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
[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: Wed Nov 27 03:05:40 GMT 2024

Total time taken to generate the page: 0.05053 seconds