You will find a good answer here which includes how to get the browser to give the file the correct name (not the secript name) Re: download a file from non-web space. Have a look at the root node of this thread as well for some more links on this. Although perhaps not considered perfect form you can use application/octet-stream for any binary format. You could construct a hash that maps extensions to MIME type but why bother - the browsers often ignore it anyway and go by extension!
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Sending non-html files to a browser through a script
by tachyon
in thread Sending non-html files to a browser through a script
by michellem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |