> However, Apache htpasswd is an interactive program and we 
> need manually input the password, is there a way to automate 
> and batch process this using php scripts?

[jason@phpdev htdocs]$ /usr/local/apache/bin/htpasswd --help
Usage:
        htpasswd [-cmdps] passwordfile username
        htpasswd -b[cmdps] passwordfile username password

 -c  Create a new file.
 -m  Force MD5 encryption of the password.
 -d  Force CRYPT encryption of the password (default).
 -p  Do not encrypt the password (plaintext).
 -s  Force SHA encryption of the password.
 -b  Use the password from the command line rather than prompting for it.

Looks like you should be able to run htpasswd as a fire-and-forget
operation, just play with the flags.

Jason

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to