PHP passthrough slow
<p>For various reasons, I need to play the intermediary between an HTTP Request and a file on disk. My approach has been to populate headers and then perform a readfile('/path/to/file.jpg');</p>

<p>Now, everything works fine, except that it returns even a medium sized image very slowly.</p>

<p>Can anyone provide me with a more efficient way of streaming the file to the client once the headers have been sent?</p>

<p>Note: it's a linux box in a shared hosting environment if it matters</p>
