Php crawler reading all data from 2 htmls
<p>How can I read all data with a crawler from a page that has 2 html tags, for example:</p>

<pre><code>&lt;html&gt;
&lt;body&gt;
text text text
&lt;/body&gt;
&lt;/html&gt;



text2 text2 text2 text
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I need to replace the first closing html and body tags, and then to read all data. How do I do that?</p>