- C CLv 61 decade agoFavorite Answer
I only know the basics about this, so I can't guarantee you that this is the most secure way to do what you want to do.
I think basically you need to write a CGI script using perl. Using the CGI module, you can create a online form published on www (or just write a webpage using html, but calls the cgi script when you are trying to link to a form), collect the user input, and then internally look up a hash containing user id and password.
This is a pretty useful website with tutorials and examples.
Particularly the "running a form-to-email gateway is similar to what you need to do. You just need to tweak it a bit. If you try to store the list of username and password in a separate text file, I would suggest keeping the text file in a folder higher than the www folder so that people can't look up the password easily. But again, I'm not sure if this is the most secure method.
2008-10-12 11:00:44 補充：
Particularly the "running a form-to-email gateway" section is similar to what you need to do.Source(s): found the website when i tried to password protect a webpage.