Re: Serving out a file to Firefox ... headers?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, November 23, 2006 10:40 pm, Brian Dunning wrote:
> Sorry to revisit this issue YET ONE MORE TIME...  :)  :)
>
> My online store sends out the file for download upon purchase. Below
> are the headers I send, and I understood that it should work for all
> browsers. It does not work for Firefox. Suggestions?
>
> header('Content-Type: application/octet-stream');



> header('Content-Disposition: attachment; filename='.$filename);

This header is a bogus MS made-up header that "extends" the HTTP spec,
and will not work for anything but IE, and only kinda sorta works on
IE anyway...

Well, IE itself only kinda sorta works, but that's another topic or
twenty. :-)

Here is a rather long-winded rant on this very topic:
http://richardlynch.blogspot.com

You may be able to find a short and more concise version elsewhere.

OTOH, you may find the rant entertaining, as some have.




> $size = filesize('../../store/files/'.$filename);
> header('Content-Length: '.$size);
> readfile('../../store/files/'.$filename);


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux