我正在使用簡單的HTML Dom從遠程網頁上刪除關鍵字,但我無法弄清楚如何實現這一點。使用Simple HTML Dom檢索關鍵字元標記內容?
我目前在使用下面的代碼。
$html = str_get_html($remote_html);
echo $html->find("meta[keywords]")->content;
和接收以下錯誤:
Trying to get property of non-object
http://simplehtmldom.sourceforge.net/
確定'$ remote_html'包含關鍵字? – 2012-07-24 21:01:41
我確信$ remote_html包含關鍵字。 – Muggles 2012-07-24 21:06:29
嘗試'echo $ html-> find(「meta [keywords]」);' – 2012-07-24 21:08:31