title: How capture image from ip camera with PHP
body: <p>So far i have this code which never stop loading</p>
  
  <p>camera.php</p>
  
  <pre><code>$img = 'http://userid:password@ipaddress/mjpgstreamreq/1/image.jpg'; 
  header ('content-type: image/jpeg'); 
  readfile( $img ); 
  </code></pre>
  
  <p>index.html</p>
  
  <pre><code>&lt;img src="camera.php" /&gt;
  &lt;!-- But this does not work --&gt;
  </code></pre>
  
  <p>and if I have in a img tag on the page with this url as the src also never stop loading the page, and I am trying to read just the snapshot it is not a continues frames this is a recorded picture took with the ip camera, that I want to read and save in a file for future needs, and I am at localhost and the ip camera is in another network if it matters, so how can I read this without this continues loading.</p>