title: Stream response from CURL request without waiting for it to finish
body: <p>I have a PHP script on my server that is making a request to another server for an image.</p>
  
  <p>The script is accessed just like a regular image source like this:</p>
  
  <pre><code>&lt;img src="http://example.com/imagecontroller.php?id=1234" /&gt;
  </code></pre>
  
  <p>Browser -> Script -> External Server</p>
  
  <p>The script is doing a CURL request to the external server.</p>
  
  <p><strong>Is it possible to "stream" the CURL response directly back to the client (browser) as it is received on the server?</strong></p>
  
  <p>Assume my script is on a slow shared hosting server and the external server is blazing fast (a CDN). Is there a way to serve the response directly back to the client without my script being a bottleneck? It would be great if my server didn't have to wait for the entire image to be loaded into memory before beginning the response to the client.</p>