Hi, you may have seem my last post "Passing a file to a funcion without user input" well I thought I'd got it working. It does everything I want it to apart from work :-(. It makes the file and copies it into the right place, but the passwords don't let me in.
Anyway as I'm new to this and spent all weekedn trying to work it out, with no luck I thought it was time to ask for some help/advice.
What I need to do is:
1, Take a text file with user names and passwords (Which I have already on my web server)
2, A web page that will make a .htpasswd with the passwords encrypted.
If anyone can help it will be much appreciated.
Cheers
Andy-T
PS
Not sure if this will help or not but, the passwords that my script make are about 34 chr long and the ones I can make using the control planel on my server are only about 13. The 13 ones work the others don't :-(. It's on Apache version 1.3.34 (Unix) if that helps.
The line of code to make the password is
$password = crypt($newpass, base64_encode($clearTextPassword));
PPS
I found the first problem the line should be
$password = crypt($newpass, base64_encode($newpass));
:-)
Done it, wasn't as hard as I thought.