PetePumaHow many lumps do you wantPremium,MVM
|reply to vollie |
Re: PHP: Get TLD from URL
This might not work for .co.uk URLs, where you want the last *3* parts of the URL. The country domains are a tricky bunch, and are not consistent.
Mh, forgot about that one, thanks. Luckily I needed the subdomain as well (whereby (?:.+://)?([^/]+)(?:/?.*)? does the trick), but in this case it seems one needs to stick with JAAulde's answer indeed.