When I generate the password using the htpasswd tool it generates the password in MD5 APR format. Please let me know how I can generate the same using php. Hope I will get your help in this
Google -> "htpasswd php", first hit. E.g. function sha($pass){ return "{SHA}" . base64_encode(pack("H*", sha1($pass))); } Code (markup):
Ya htpasswd seems to work with 'almost anything'. Eg. This maybe works too: function htpasswd($pass){ return crypt($pass); } Code (markup): ((Pws can be stored like "user:yourpass" without hash too.))