That only works for one or two users at a time. A whole lot of users at once and the .htpasswd file becomes unmanagably large.You really don't need a script for that. You can just use .htaccess control.
I was forced to use that method on a couple sites, and they all have thousands of users. Never had any issues at all. Simple text files (.htpasswd) generally don't get that large. It's only a few bytes per line.That only works for one or two users at a time. A whole lot of users at once and the .htpasswd file becomes unmanagably large.
That is kind of what I need.What Sander needs is something more along the lines of a MySQL-backend login system. It's not that hard to code one, but off hand I don't have anything suitable short of ripping the authentication code out of my own site and using that- I did a hashed password solution using session cookies for reauthentication between pages.