I have written an entire register/login script for my site in php. I just recently switched hosts to a company called DailyRazor.com. They have Cpanel 10.
I am trying to password protect a directory, but I want the users to have to register on my site before they can access it. I would like to use CPanel's built in directory protection, but I am having a problem regarding the passwords.
I know how I can write the information to the htpasswd file, but I don't know how to encrypt the passwords when I write them to the file.
I guess what i'm asking for is what type of encryption is used on passwords when the htpasswd files are written. A code example as well as an explanation would be great, because I do not know exactly what "salt" is, except that it pertains to encryption.
Any help would be greatly appreciated.