arvind Posted February 5, 2004 Posted February 5, 2004 I know of the webprotect thing inside cpanel but that allows me to password protect folders how do I go about password protecting a file ? Quote
TCH-Thomas Posted February 5, 2004 Posted February 5, 2004 If its a downloadable file, I would use winzip to password it. Quote
arvind Posted February 5, 2004 Author Posted February 5, 2004 no i mean like an html file/php file/java file etc. not downloadable Quote
TCH-Bruce Posted February 5, 2004 Posted February 5, 2004 (edited) If you web protect a folder, any direct links to anything in that folder will require the login/password combination. Say you have an image called "sample.jpg" in a folder called "free" on your site that has web protect turned on. Create a link to ****/free/sample.jpg and access it. The login/password dialog will open and won't display the image until the correct information is given. Edited February 5, 2004 by TCH-Bruce Quote
DarqFlare Posted February 5, 2004 Posted February 5, 2004 What you're asking is to pass-protect just one file and not a folder? Can't be done, to my knowledge. You'll have to do what bruce is suggesting, because I don't think you can setup a password protection on one file in an unprotected folder. Quote
TCH-Rob Posted February 5, 2004 Posted February 5, 2004 Try http://php.resourceindex.com/Complete_Scri...ord_Protection/ or http://www.hotscripts.com/CGI_and_Perl/Scr...ord_Protection/ I am sure there may be more and you will have to filter through some of these. You could also try creating a login page that when successful will redirect the user to the file as well. Quote
Madmanmcp Posted February 5, 2004 Posted February 5, 2004 I'm with Bruce. Create a folder, web protect it and put the file in it. Quick an easy I would think. Quote
TCH-Bruce Posted February 5, 2004 Posted February 5, 2004 I use it all the time to distribute updates. Works great! 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.