Forum Moderators: coopster

Message Too Old, No Replies

adding user to password protected directory

         

dend

12:45 am on Apr 23, 2004 (gmt 0)

10+ Year Member



Hi

Need some help in writing a script which adds/deletes user to password protected directory (with .htaccess)

Maybe anyone has any example or can tell me where to begin?

Big thanks!

Birdman

11:55 am on Apr 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I had done exactly that and would've gladly given up the code had it not been lost on my fried hard drive :(

But, I can steer you in the right direction. First, learn how to set up a password protected dir and add users manually. Once you understand what the files consist of, it's just a matter of using PHP's filesystem functions to write to the files automatically.

It won't be easy, but should be a good learning experience.

Birdman

dend

3:00 pm on Apr 24, 2004 (gmt 0)

10+ Year Member



Birdman thank you for your kind reply!
Anyway I hope someone has that script. I am just beginner in PHP, but need this script ASAP.

I could pay someone for this..

I do manage directories and users via cPanel but would like to automate this process.

WhosAWhata

4:49 pm on Apr 24, 2004 (gmt 0)

10+ Year Member



the first thing to understand is that .htaccess passwords can never be recovered,
it you're content with this, it can be used with the crypt() function

PM me and i'll help you make a more personalized script, i've also been playing around a lot with .htaccess and .htpasswrd files