function getPageTitle($url)
{
$matches = NULL;
$html = file_get_contents($url);
$html = mb_convert_encoding($html, 'utf8', 'auto');
if (preg_match( "/<title>(.*?)<\/title>/i", $html, $matches)) {
return $matches[1];
} else {
return FALSE;
}
}