我試著用 simple_html_dom 去爬蟲
// Create DOM from URL or file
$html = file_get_html('https://www.google.com/');
// Find all images
foreach($html->find('img') as $element)
echo $element->src . '<br>';
// Find all links
foreach($html->find('a') as $element)
echo $element->href . '<br>';
他提供的範例可以抓到但我想抓搜尋結果卻出現500錯誤我只是把url改成 https://www.google.com.tw/sea...怎麼回事呢?!
添加回答
举报
0/150
提交
取消