I have coded a script that will select users out of the database then write the users name and passwd in to htpasswd and store the password using crypt with and substr to select the first 2 chars of the passwd as a salt.. but when i try to authenticate my self with htaccess.. for some reason it wont alow me in.. any hints .. here is part of m crypt code
$salt = substr($password,0,2);
$password=crypt($password,$salt);
$newLine=$username.":".$password."\n";
as far as my knowledge goes http takes the first 2 chars of the passwd in to salt for authentication.. and here is the way it gets encrypted
xlordt:12tir.zIbWQ3c
the passwd is 123456 but it wont allow me to enter the protected dir