php - Get all HTML comments on website with html simple dom -
I have tried to get all the comments from a website ( Here is my current code: Include Anyone have any suggestions on how to capture comments, at this time it is only giving me blank page I do not know how to parse and
-> ), but without luck.
('simple_html_dom.php'); $ Html = file_get_html ('url'); Foreach ($ html-> Mill ('comment') as $ element) $ element- & gt; Plain text;
regex the HTML, but
& lt ;! - - (. *?) - & gt; You can use the same
regex to search and find comments ...
Comments
Post a Comment