Quote:
Originally Posted by cLin
Code:
$domain_strip = preg_replace("/^(.*\.)?([^.]*\..*)$/", "$2", $_SERVER['HTTP_HOST']);
$domain = substr($domain_strip, 0, strpos($domain_strip, "."));
Grabs the domain name from website url. If that's what you want.
|
Erk.
Try:
Code:
echo parse_url($u,PHP_URL_HOST);
Where $u has your URL string.