Ver original$url = "www.midominio.com";$name = substr(strrpos($url, "."),1); echo $name; //Print only www.midominio