$url = "https://tw.news.yahoo.com/technology/";
if(false !== ($file = file_get_contents($url)) ){
$html = str_get_html($file);
if($html && is_object($html) && isset($html->nodes)){
echo $html -> find('div.txt',0) -> innertext;
}
}else{
echo 'url有問題';
}