Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Find the top level domain name from subdomain

3 views
Skip to first unread message

susi

unread,
Mar 17, 2010, 12:48:43 AM3/17/10
to
Hi

Are there any utility to find the top-level domain name from the
subdomian url.
Can any one help me?

Thanks in advcance

Nick Keighley

unread,
Mar 17, 2010, 4:43:16 AM3/17/10
to
On 17 Mar, 04:48, susi <susmit...@gmail.com> wrote:

>     Are there any utility to find the top-level domain name from the
> subdomian url.
> Can any one help me?

this is off-topic to comp.lang.c, please try elsewhere

Richard Bos

unread,
Mar 17, 2010, 9:03:34 AM3/17/10
to
susi <susm...@gmail.com> wrote:

> Are there any utility to find the top-level domain name from the
> subdomian url.

Yes; it's called strchr() followed by strrchr().

Richard

Bill Reid

unread,
Mar 17, 2010, 10:12:54 AM3/17/10
to
On Mar 16, 9:48 pm, susi <susmit...@gmail.com> wrote:
>
>     Are there any utility to find the top-level domain name from the
> subdomian url.
> Can any one help me?
>
There are several APIs and whatnot floating around
out there that do this, as well as doing the reverse,
assembling a full URL from various components...Microsoft
has it as part of their "wininet" API...I don't have
the URLs right handy at this time, try Google(TM)...

---
William Ernest Reid

0 new messages