function GetUrlRoot($url)
{
preg_match('/[w][w-]*.(?:com.cn|com|cn|co|net|org|gov|cc|biz|info)(/|$)/isU', $url, $domain);
return rtrim($domain[0], '/');
}
function GetUrlRoot($url)
{
preg_match('/[w][w-]*.(?:com.cn|com|cn|co|net|org|gov|cc|biz|info)(/|$)/isU', $url, $domain);
return rtrim($domain[0], '/');
}