tb he encontrado este
Código PHP:
<?
$url = "http://www.google.com";
$file = file($url);
$file = implode("",$file);
if(preg_match("/<title>(.+)<\/title>/i",$file,$m))
print "The title of $url is <b>$m[1]";
else
print "The pagev".$url." doesn't have a title tag"; ?>
pero también me imprime siempre el caso error...