Re: How to make a secure download ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/07/12 14:32, donkfather@xxxxxxxxxxxxx wrote:
Hi,

I am trying to put a file to download. I want it secure so only the people having the password can access it. I made a page that requires a password.. if the password is correct it changes the password send it on my mail and redirects the user to another script. This script searches in the database for the id given with GET and finds the name of the file which is md5(something). it changes the name of the file in md5(smth else). After that it searches in the download folder for a file named md5(smth else). if it finds the file it gives you the link to the file. So i need to find a way to change the filename after the user downloads the file. to keep it secure so the user
wont be able to share the link to oters.

if you need more info ask :D
thanks
and sorry for my bad english .


Sounds like you are overcomplicating it. Following what you've already done though...

Have the original files stored somewhere outside of the web root. That way they aren't accessible whatsoever + you shouldn't have to change any of the files at any stage.

Then you can simply update/change the ID that associates with it in your database when that URL is hit...

Gibbs

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux