Re: Getting the domain from an url?
| From: | CC Zona | Date: | Sat, 12 May 2001 22:45:13 +0000 |
| Subject: | Re: Getting the domain from an url? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-52594@lists.php.net to get a copy of this message | ||
In article <OFEKJLCGICKDNJIKIAICEEAICBAA.agathorn@cfl.rr.com>,
agathorn@cfl.rr.com ("John Vanderbeck") wrote:
> I am quite horrible when it comes to regexps, but I have a string that
> contains a complete url, like:
> http://www.domain.com/this/is/it.html
>
> And I need to strip everything but the domain so that I am left with:
> www.domain.com
Relax, you don't need a regex. See <http://php.net/parse_url>
--
CC