-   Programming (
-   -   PHP generate htpasswd (

newuser455 06-11-2006 03:30 PM

PHP generate htpasswd
What do I need to do with PHP to encrypt a password for use in a .htpasswd file?

fedora4002 06-12-2006 11:00 AM

More details, please.

newuser455 06-12-2006 11:12 AM

I think I have what I want.

PHP Code:

// Encrypt a password for a .htpasswd file.
function enc_pass($pass)
$pass crypt(trim($pass),base64_encode(CRYPT_STD_DES));

All times are GMT -5. The time now is 07:09 PM.