我嘗試學習捲曲使用,但我不明白它是如何工作的。我如何使用curl(或其他函數)訪問表的一個(頂部)數據條目。到目前爲止,我只能夠檢索整個網站。我怎麼能回聲整個表,特別是第一個條目。我的代碼是:從另一個網站的html表中檢索單行?
<?php
$ch = curl_init("http://www.w3schools.com/html/html_tables.asp");
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
?>
http://www.php.net/manual/en/class.domdocument.php –