luchuanc
asked on
PHP - How to download a file from a secured web server folder
Hi,
How to to use php to download a file from a secured web server folder?
Thanks,
Luchuan
How to to use php to download a file from a secured web server folder?
Thanks,
Luchuan
ASKER
Hi Ray,
Thanks a lot for your help.
I tried the force_download script with my csv file on the web , it prints on the browser. Is it possible to let user pick a folder on their PC and download the file there?
Thanks,
Luchuan
Thanks a lot for your help.
I tried the force_download script with my csv file on the web , it prints on the browser. Is it possible to let user pick a folder on their PC and download the file there?
Thanks,
Luchuan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot,Ray,
Luchuan
Luchuan
Thanks for the points - it's a great question, ~Ray
Place the files in a location that is outside of the WWW root directory, so links to the files cannot exist. The only way to get the files is to go through a downloader script. A sample of the script is attached. You can password protect this script and apply other rules - whatever your business rules need to be.
best regards, ~Ray
Open in new window