[thelist] Initiating a Download
Timothy J. Luoma
lists at tntluoma.com
Mon Aug 19 20:30:01 CDT 2002
Jake Aust wrote:
> Is there a way to do this with PHP? JavaScript? I know I've seen it done,
> but I don't know how to do it.
Usually this is done by setting the MIME type to "application/octet-stream"
If you have htaccess for the directory, use
AddType application/octet-stream gif
AddType application/octet-stream jpg
(note: this will apply to all files with those extensions in the directory)
You can also do this with PHP... there is a discussion of it here
http://www.php.net/manual/en/function.header.php
Search Google for "octet-stream force download" for more
TjL
--
Coming soon:
30 Days to becoming an Opera Lover
http://www.tntluoma.com/opera/lover/
More information about the thelist
mailing list