Re: Domain Name ?
| From: | Red Wingate | Date: | Thu, 01 Apr 2004 13:57:57 +0000 |
| Subject: | Re: Domain Name ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-182017@lists.php.net to get a copy of this message | ||
How about RTFM ?
http://de2.php.net/parse_url
Ryan A wrote:
On 4/1/2004 11:58:01 AM, Ralph Guzman (ralph213@sbcglobal.net) wrote:The easy way... $domain = "http://www.foo.com"; $domain = explode('.', $domain); $foo = $domain['1'];Yep, thats the easy and good solution, but be warned if a subdomain is used or if www is not put eg: http://foo.com you will get crappy results. HTH Cheers, -Ryan