RE: Domain name from host name

Mike Bouffler <[email protected]> Tue, 19 Aug 2003 09:42:44 +0100
Newsgroups gmane.comp.lang.delphi.programming
Message-ID <49F84FD1ADD9D311907500E018C24418404C2E@CARTMAN>
Why not just search for the first '/' and take anything to the left of it?

MikeB

> -----Original Message-----
> From: Howie Hamlin [mailto:[email protected]]
> Sent: 18 August 2003 16:59
> To: [email protected]
> Subject: [Delphi] Domain name from host name
> 
> 
> Does anyone know of a reliable routine to obtain the domain 
> name from a host name?  For example:
> 
> host = domain
> 
> mai1.domain.com = domain.com
> mail.east.domain.com = domain.com
> mail.domain.co.uk = domain.co.uk
> mail.west.domain.com.au = domain.com.au
> mail.domain.store = domain.store
> 
> Basically, I need the root domain from any host name provided 
> to the function.
> 
> Thanks,
> 
> Howie
> 
> 
> ------------------------ Yahoo! Groups Sponsor 
> ---------------------~-->
> Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
> Printer at Myinks.com. Free s/h on orders $50 or more to the 
> US & Canada. http://www.c1tracking.com/l.asp?cid=5511
> http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/i7folB/TM
> --------------------------------------------------------------
> -------~->
> 
> Delphi VCL Top Sites!
> http://www.sandbrooksoftware.com/TS/TS2/Components.shtml
> ---------------------------------------------------------------
> Unsubscribe:[email protected]
> List owner:[email protected]
> --------------------------------------------------------------- 
> 
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/ 
> 
> 

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/i7folB/TM
---------------------------------------------------------------------~->

Delphi VCL Top Sites!
http://www.sandbrooksoftware.com/TS/TS2/Components.shtml
---------------------------------------------------------------
Unsubscribe:[email protected]
List owner:[email protected]
--------------------------------------------------------------- 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/