How to force a file download
| From: | Santiago Romero | Date: | Fri, 13 Jul 2001 10:23:43 +0000 |
| Subject: | How to force a file download | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-57713@lists.php.net to get a copy of this message | ||
Hi!
I have some code that outputs (from a php3 cgi) email attachments
under horde/IMP webmail. I would like ALL attachment (including
all understood by web browser mime types) to be SAVED to disk,
and not opened.
I tryed to send them as application/octet-stream but Explorer
does open them (Netscape treats them correctly and asks me
to save to disk or open them). Under Explorer, if the output of
clicking on the "Download attach" link is pure text, it opens
it directly on the web browser instead of saving it (that's
what i want! :). On PDFs, it opens acrobat reader, BUT man!,
I'm passing it application/octet-stream, this should force
explorer to save it!
Any idea?
--
Santiago Romero
Departamento de Sistemas
sromero@servicom2000.com
Av. Primado Reig 189, entlo
46020 Valencia - Spain
Telf. (+34) 96 332 12 00
Fax. (+34) 96 332 12 01
http://www.servicom2000.com