Get title of website via link
My answer is expanding on @AI W’s answer of using the title of the page. Below is the code to accomplish what he said. <?php function get_title($url){ $str = file_get_contents($url); if(strlen($str)>0){ $str = trim(preg_replace(‘/\s+/’, ‘ ‘, $str)); // supports line breaks inside <title> preg_match(“/\<title\>(.*)\<\/title\>/i”,$str,$title); // ignore case return $title[1]; } } //Example: echo get_title(“http://www.washingtontimes.com/”); ?> … Read more