i need a program which allows users to download files with password, here's my algorithm:
- user buys license and gets a code like
A_Long_And_Not_Guessable_Key
- then user goes to my program, e.g.
site.com/index.php?id=12
- User can see details about the file
- user sends the code and gets the file
Files are here: home/files
and script is here home/public_html/
all the steps are easy to write except the last step! when password is checked, how can i get the file from home/files
and give to user?
here is what i got with search but didnt help that much:
Making a downloadable file password protected on webpage
how to password protect downloadable pdf files in website
PHP Downloading a file from a different password protected server
BTW all files have .zip
extension