Forum Moderators: phranque
I would like ask your help.
I wanna set up a members page, i will use .htaccess
and .htpasswd
My question Is there any script witch do the following:
1. Authenticate the user
2. log his username, ip address and date to a txt file.
Is it possile to find something like this?
Thanks,
Thomas
This is a very common type of script. Depending on your server, take a look at prebuilt Perl, ASP, PhP or JSP scripts. You can find these many places on the web such as cgiresources.com
You will need to install them, but password verification and logging is one of the simpler tasks.
It does need to work server side though to be effective.
Basically you have an HTML form: name, password, submit
The action of the form points to the script that will handle validation. I point these back to the same page in JSP.
Then, you read the file with the valid names and passwords, comparing what was submitted. If it's a match, you would write to the text file, and redirect the user to the proper page. If it's wrong you would redirect the user to the wrong page.
Go search and play with a bit and if you still need help, write again and let us know how you're doing.