Hey!
I have a htpasswd file with a lot of user/password combos like this:
test:dGRkPurkuWmW2 (test:test)
test1:dGlAW3zdxeAG2 (test1:test1)
test2:dG/F7fZAgYRys (test2:test2)
test3:dGXpGzCltZZ72 (tes3t:test3)
I want to use a login form instead of BASIC_AUTH to authenticate my users...
so first we gotto get the values from the form (member_username,member_pass) then open my htpasswd:
$file = file_get_contents('/full/path/to/htpasswd');
Then I guess we have to preg_match the array and use array_flip/array_slice??
Thanks!
Our community of experts have been thoroughly vetted for their expertise and industry experience.