I've tried to grab all the comments from a website (The text between <!-- and -->), but without luck.
Here is my current code:
include('simple_html_dom.php');
$html = file_get_html('THE URL');
foreach($html->find('comment') as $element)
echo $element->plaintext;
Anyone have any ideas how to grab the comments, at the moment it's only giving me a blank page
$html's value before foreach to make sure that it is loaded successfully?echoand it outputs html comment, browser doesn't show it. Try to dovar_dump($element->plaintext);to make sure that there is a value.