http://de2.php.net/parse_url
Ryan A wrote:
On 4/1/2004 11:58:01 AM, Ralph Guzman ([EMAIL PROTECTED]) 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
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php