title: read webpage (with dynamic content) and save
body: <p>Im using <code>file_get_contents()</code> and the source is a url. Im also using ajax to insert html into the page.
  <br/><br/><br/>
  The page when loaded:</p>
  
  <pre><code>&lt;div&gt;  
       &lt;!-- Html goes here when the insert button is pressed --&gt;
  
       &lt;input type="button" onclick="insertHtml()" value="insert"/&gt;
       &lt;input type="button" onclick="saveThisPage()" value="save"/&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><br/></p>
  
  <p>And when html is added dynamically with ajax:</p>
  
  <pre><code>&lt;div&gt;    
       &lt;!-- Html goes here when the insert button is pressed --&gt;
          &lt;div&gt;Some text here...&lt;/div&gt;
          &lt;div&gt;Some text here...&lt;/div&gt;
          &lt;div&gt;Some text here...&lt;/div&gt;
  
       &lt;input type="button" onclick="insertHtml()" value="insert"/&gt;
       &lt;input type="button" onclick="saveThisPage()" value="save"/&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><br/><br/>
  Now I want to save what <code>file_get_contents()</code> returns and store the data into the mysql database.<br/><br/> I press the "save" button and a query is sent to a php file to read the page (url source) ...except what is saved is the content when loaded WITHOUT the new data i.e <br/>  <code>&lt;div&gt;Some text here...&lt;/div&gt;</code>
  <br/><br/>
  What do I do? What function(s) do I use?</p>