In asking around and doing some research, it seems like many people are really pushing X-Sendfile as the preferred method of serving large downloadable files to a browser-based client from a PHP script.
Some methods I've been looking into are:
- Streaming fopen
- Streaming cURL
- file_get_contents
- cURL
- X-Sendfile
Of these, most people are telling me that X-Sendfile is the best.
The problem is, I am trying to implement a download method that is not only capable of handling large files, but also widely universal on most servers, since the script I am writing will be used by many other servers than just my own.
My question is: What makes X-Sendfile so much better? If it's so good, why don't I hear a lot about it and why isn't it being used more often? Lastly, will most typical low-budget shared web hosts support X-Sendfile?
Thanks!