|
|
 |
Re: FN-FORUM: PHP Download script
date posted 17th January 2008 19:41
On 17 Jan 2008 12:16:30 -0000, Alex Townsend [EMAIL REMOVED] wrote:
> For the file download I'm using, I went with Juraj Seffer's example
> using readfile (from way back near the start of this thread) which has
> so far worked fine on everything and all file sizes.
>
> Alex
> http://www.ozbon.com
>
Glad it works for you and also that I contributed to something
meaningful finally :)
Sometimes less is more with headers and stuff because one can confuse
browser with too many specifications.
The PHP code was:
header("Expires: Mon, 26 Jul 2057 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header('Content-type: image/jpeg'); // this can also be something like
"Content-type: application/octet-stream" etc
echo readfile($path);
Juraj aka Jay
--
Web Developer
Cathill Design
Web Development | Graphic Design | Multimedia
www.cathill.com/portfolio
|
 |
|