I have a PHP3 script that ask the user to type in username and password by sending an 'HTTP/1.0 401 Unauthorized' heading.
This is then stored in the $PHP_AUTH_USER and $PHP_AUTH_PW variables.
How can I validate the passwords against a file on the server?
I use a free web host so I can't change anything on the server.
I found the script on http://hotwired.lycos.com/webmonkey/
. There is an example on how to validate agains a text file, but it won't work, only the last password in the file works properly.