Results 1 to 6 of 6

Thread: PHP and password protection of folders

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2002
    Location
    Singapore
    Posts
    32

    PHP and password protection of folders

    Heya all,

    i'm running Apache on a windows machine. Can I use PHP to create a form that will automatically add users to the list of users that can access a protected folder?

    Also, can I use PHP to change the passwords for specific users?

    thanks!
    C you, C me

  2. #2
    Lively Member scoutt's Avatar
    Join Date
    Aug 2002
    Posts
    84
    how are you password protecting them? is it in the control panel? if you are using .htaccess file it might be possible.
    Just Imagine what you can do with the power of php.

    257 Tutorials and counting.
    529 Snippets and growing.

    Add yours today @
    SnippetLibrary.com

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2002
    Location
    Singapore
    Posts
    32
    Originally posted by scoutt
    how are you password protecting them? is it in the control panel? if you are using .htaccess file it might be possible.
    i basically use htpasswd to generate the password list then modify the httpd.conf to set directory permissions
    C you, C me

  4. #4
    Lively Member scoutt's Avatar
    Join Date
    Aug 2002
    Posts
    84
    well if you are setting them with php then what is stopping you from changing them? you should be able to. just load the file and then append to it ro search through it so you get the right name or password.
    Just Imagine what you can do with the power of php.

    257 Tutorials and counting.
    529 Snippets and growing.

    Add yours today @
    SnippetLibrary.com

  5. #5

    Thread Starter
    Member
    Join Date
    Jul 2002
    Location
    Singapore
    Posts
    32
    actually, i use htpasswd and edit the httpd.conf file by hand, not by script.
    C you, C me

  6. #6
    Lively Member scoutt's Avatar
    Join Date
    Aug 2002
    Posts
    84
    well you will have to get the passwords encrypted and php can't do that that I know of. so you will have to use a perl script I think.

    you can add them to the htaccess file as all you ned to do is load it in a variable them add to it, then load it back in the file.
    Just Imagine what you can do with the power of php.

    257 Tutorials and counting.
    529 Snippets and growing.

    Add yours today @
    SnippetLibrary.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width