我在PHP下面的代碼與捲曲/ PHP提取HTML數據
$ch = curl_init("http://blog.com");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
echo $output;
我試圖導入的代碼塊中<div id="content">
和</div>
之間我想知道提取該代碼的最佳方式。
請參閱http://stackoverflow.com/questions/3650125/how-to-parse-html-with-php – deceze 2010-10-05 05:46:04
也http://stackoverflow.com/questions/3577641/best-methods-to-parse-html – 2010-10-05 05:46:44