View Full Version : PHP Download Script?
alexjewell
05-15-2006, 03:58 PM
I want a user to be able to download a .zip file containing examples of a tutorial.
I need a script that'll download the file when they click "click here" or something.
And, if it's possible, to have the size of the file in the dialogue box when it downloads.
Any ideas?
<a href="file.zip">Download file in ZIP format</a>
cdwhalley.com
05-15-2006, 10:44 PM
Also, you can get the filesize of a file with PHP using filesize() (http://www.php.net/manual/en/function.filesize.php), if that helps.
djr33
05-15-2006, 11:17 PM
Just a link is what you should do.
If you really want something complex, it's not PHP that you need, but javascript. If you want a download progress bar, this will be a LOT of work, maybe even using ajax (javascript) to call php functions, depending on stuff.
Why? People can get a progress bar from their browser anyway.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.