I\'m creating a little web app to help me manage and analyze the content of my websites, and cURL is my favorite new toy. I\'ve figured out how to extract info about all so
For the HTML comments a fast method is:
function getComments ($html) { $rcomments = array(); $comments = array(); if (preg_match_all('#<\!--(.*?)-->#is', $html, $rcomments)) { foreach ($rcomments as $c) { $comments[] = $c[1]; } return $comments; } else { // No comments matchs return null; } }