darnell Posted August 1, 2006 Posted August 1, 2006 (edited) Hello everyone, I am in need of something that may be fairly simple. I have a website that I am developing www.voiceforinmates.com And want to have password protected downloadable files on each personal page. Basically I would like to present a link on each personal page where there are downloadable documents BUT! you must have the password THEY have chosen for their document in order to be able to actually download it. example: Legal transcripts..... Thank You for any help given. Darnell Edited August 1, 2006 by darnell Quote
TCH-Bruce Posted August 1, 2006 Posted August 1, 2006 Head on over to hotscripts.com. I'm sure you will find something of use there. Quote
TCH-Thomas Posted August 1, 2006 Posted August 1, 2006 Not sure this will help but if only the file needs to be password protected and not the link, you can use WinZip to protect the file. Quote
Samrc Posted August 2, 2006 Posted August 2, 2006 BUT! you must have the password THEY have chosen for their document in order to be able to actually download it. Since your are not asking to lock the FILE but lock access to the DOWNLOAD ability, why not use the WEBPROTECT option in cpanel? For each person, create a folder. Use WebProtect to put a username/password combination on the folder. All files in that FOLDER would have same password. Store docs for that person in that folder. Then from the web page, link to the file h**p://www.yoursite.com/webpage.htm would link to: /samc1/file1.zip or /samc1/file2.doc or /joef1/file1.zip etc. To download/view the file, the assigned password would be required. You can lock the individual files with passwords if necessary using winzip as Thomas suggested. (For best protection, passwords need to be several digits, mix of uppercase/lowercase/numbers and maybe characters with NO words in the dictionary. 123catdog is not good but 1Ct3a2Dgo would be acceptable.) Quote
carbonize Posted August 2, 2006 Posted August 2, 2006 (edited) Problem with password protected zips is you can still download them and you can bruteforce zip passwords at something like 2,000,000 passwords a minute. If you don't mind doing it by hand you could use .htpasswd for each file but you would have to create a new one for each user. The alternative would be PHP and MySQL. You need two database tables and a folder that is set to local access only for the files to go in. The first table being username and passwords. The second being filenames and username it's assigned to. You then make a PHP file that gets called for each download with the filename passed as a variable and then this php script asks for the username and password for that file. If correct username and password is supplied then PHP sends them that file otherwise no go. As complicated as it may sound the above method would be extremely simple to code for even someone with only basic PHP and MySQL knowledge. Actually since you only want to use a password you could get away with a single database table. Edited August 2, 2006 by carbonize Quote
darnell Posted August 2, 2006 Author Posted August 2, 2006 THANK YOU EVERYONE FOR YOUR ASSISTANCE SMILE Samrc you in particular. I figured it had to be a fairly simple solution. I am using the webprotect option as you suggested. It is exactly what I was looking for. Thanks again everyone your input was again greatly appreciated. Darnell Quote
Samrc Posted August 2, 2006 Posted August 2, 2006 Glad it worked out! We use this technique on our business site for our sales reps. Each has a different folder with their own stats and data. None can get into the others info. One thing we made sure to do...the user name did not follow the same pattern. For some of the reps, the user name is an email address, for others it is a phrase (nospaces), yet others it is a place, etc. so even if you know the other person's email address or favorite password used on other sites, you still would have to guess at the user name! Helps to keep people from entering where they don't belong! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.