preg_math title html — получить title страницы по URL
function get_title($url){ $fp=file_get_contents($url); if(!$fp){ return false; } $res=preg_match("/<title>(.*)<\/title>/siU",$fp,$title_matches); if(!$res){ return false; } $title=preg_replace('/\s+/',' ',$title_matches[1]); $title=trim($title); return $title; }