$gelen = parse_url("http://www.google.com");

$url = str_replace('www.',' ',$gelen['host']);

echo $url;
Deneyebilirsin Umarım Doğru Anladık.