php - Get all HTML comments on website with html simple dom -


I have tried to get all the comments from a website ( and -> ), but without luck.

Here is my current code: Include

  ('simple_html_dom.php'); $ Html = file_get_html ('url'); Foreach ($ html-> Mill ('comment') as $ element) $ element- & gt; Plain text;   

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 regex the HTML, but & lt ;! - - (. *?) - & gt; You can use the same regex to search and find comments ...

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -