I'm getting the source code of a page in a variable $html with this line:
$html = file_get_contents('http://www.google.com');
And when I do <textarea><?php echo htmlentities($html); ?></textarea>
It works awesome.
Now, suppose, I want to take out every <h1>
tag in the page with its content in a variable $h1, how do I do this from $html variable?