PHP Document Parser : get only words
I would like to put every words (not tags) from a webpage in an array with
DOMDocument.
ob_start();
$c = curl_init('http://example.com/');
curl_exec($c);
curl_close($c);
$content = ob_get_contents();
ob_end_clean();
$dom = new DOMDocument();
@$dom->loadHTML($content);
$words = array();
// How to do that ?
Thanks
No comments:
Post a Comment