There manual page on the readfile() function has some really good information and examples on sending a HTTP response with different headers. For example, if you want to support resuming downloads.
http://php.net/manual/en/function.readfile.php
A good thing to note for having PHP send your files is that you should use flush() if you want to start sending immediately. Otherwise PHP will buffer the output.
http://www.php.net/manual/en/function.flush.php
This is useful if you're sending a large txt download.
digital-ether
Nearly a Posting Virtuoso
1,293 posts since Sep 2005
Reputation Points: 461
Solved Threads: 101