title: How to 'scrape' content from a page's source?
body: <p>I have this code which gets the HTML source of a page:  </p>
  
  <pre><code>$page = file_get_contents('http://example.com/page.html');
  $page = htmlentities($page);
  </code></pre>
  
  <p>I want to scrape some content from it. For example, say the page's source contains this:  </p>
  
  <pre><code>&lt;strong&gt;technorati.com&lt;/strong&gt;&lt;br /&gt;
  Connection failed&lt;br /&gt;&lt;br /&gt;Pinging &lt;strong&gt;icerocket.com&lt;/strong&gt;&lt;br /&gt;
  Connection failed&lt;br /&gt;&lt;br /&gt;Pinging &lt;strong&gt;weblogs.com&lt;/strong&gt;&lt;br /&gt;
  Done&lt;br /&gt;&lt;br /&gt;Pinging &lt;strong&gt;newsgator.com&lt;/strong&gt;&lt;br /&gt;
  Done&lt;br /&gt;&lt;br /&gt;Pinging &lt;strong&gt;blo.gs&lt;/strong&gt;&lt;br /&gt;
  Done&lt;br /&gt;&lt;br /&gt;Pinging &lt;strong&gt;feedburner.com&lt;/strong&gt;&lt;br /&gt;
  Done&lt;br /&gt;&lt;br /&gt;Pinging &lt;strong&gt;blogstreet.com&lt;/strong&gt;&lt;br /&gt;
  Done&lt;br /&gt;&lt;br /&gt;Pinging &lt;strong&gt;my.yahoo.com&lt;/strong&gt;&lt;br /&gt;
  Connection failed&lt;br /&gt;&lt;br /&gt;Pinging &lt;strong&gt;moreover.com&lt;/strong&gt;&lt;br /&gt;
  Connection failed&lt;br /&gt;&lt;br /&gt;Pinging &lt;strong&gt;newsisfree.com&lt;/strong&gt;&lt;br /&gt;
  Done&lt;br /&gt;
  </code></pre>
  
  <p>Is there a way I could scrape this from the source and store it in a variable, so it'll look like this:</p>
  
  <blockquote>
    <p><strong>technorati.com</strong> Connection failed<br>
    <strong>icerocket.com</strong> Connection failed<br>
    <strong>eblogs.com</strong> Done<br>
    Ect.</p>
  </blockquote>
  
  <p>Of cause the page is dynamic which is why I'm having a problem. Could I maybe search for each site in the source? But then how would I get the result which is after it? (Connection failed / Done)<br>
  Thanks a lot for the help!</p>