title: Save whole page source using php
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1722433/save-full-webpage">Save full webpage</a>  </p>
  </blockquote>
  
  
  
  <p>I need to save page source of external link using PHP , Like we saving in PC.
  <br>p.s :saved folder has images and html contents.</p>
  
  <p>I tried below code...it just puts the source in tes.html , i need to save all images too.So we access if offline.</p>
  
  <pre><code>&lt;?php
  include 'curl.php';
  $game = load("https://otherdomain.com/");
  echo $game;
  ?&gt;
  
  &lt;?php 
  file_put_contents('tes.html', $game);
  ?&gt;
  </code></pre>