Another function from PHP information
Get webpage title providing a link
function getdoctitle($link) {
$lines = @file($link);
$str=implode(”\n”,$lines);
$str=str_replace(”Title>”,”title>”,$str);
$str=str_replace(”TItle>”,”title>”,$str);
$str=str_replace(”TITle>”,”title>”,$str);
$str=str_replace(”TITLe>”,”title>”,$str);
$str=str_replace(”TITLE>”,”title>”,$str);
if (strpos(” $str”,”<title>”) and strpos(” $str”,”</title>”)) {
$a1=explode(”<title>”,$str);
$str2=$a1[1];
$a2=explode(”</title>”,$str2);
$str3=$a2[0];
return $str3;
} else {
return “”;
}
}
Get webpage title providing a link
function getdoctitle($link) {
$lines = @file($link);
$str=implode(”\n”,$lines);
$str=str_replace(”Title>”,”title>”,$str);
$str=str_replace(”TItle>”,”title>”,$str);
$str=str_replace(”TITle>”,”title>”,$str);
$str=str_replace(”TITLe>”,”title>”,$str);
$str=str_replace(”TITLE>”,”title>”,$str);
if (strpos(” $str”,”<title>”) and strpos(” $str”,”</title>”)) {
$a1=explode(”<title>”,$str);
$str2=$a1[1];
$a2=explode(”</title>”,$str2);
$str3=$a2[0];
return $str3;
} else {
return “”;
}
}