OZONE Asylum
Forums
Stupid Basic HTML
Make it download
This page's ID:
9717
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
I believe this is something that can be done on the server side only. If you have PHP available, try this script: [code]<? $filename = $_GET['file']; // To prevent caching header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); // To tell the browser to download header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/save"); // To get a Save prompt and suggested filename header("Content-Disposition: attachment; filename=".basename($filename).";"); // To send in binary header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize("$filename")); // Read the file already readfile("$filename"); exit(); ?>[/code] Would probably be easiest to save it as "download.php" in the directory the .doc file is in and link to the file with "download.php?file=blub.doc". Instead of the "octet-stream" header you might also try one specifically for Word documents, though I'm pretty sure it'll work as it is as well.
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »