$url = 'http://www.google.co.nz';

echo end(explode('.', $url));

On Mon, Jan 26, 2009 at 10:12 PM, <[email protected]> wrote:

>
> > What I need to do is grab the TLD from a URL string-
> > eg: www.networkstuff.co.nz - what I want returned is the 'nz' part.
>
> Try http://nz.php.net/parse_url
>
> Regards
> Jonathan
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to