Forum Moderators: phranque

Message Too Old, No Replies

User authentication and logging!

I need help to find a suitable script

         

Stenley

11:32 pm on Mar 19, 2003 (gmt 0)



Hi Guys!

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

txbakers

3:59 am on Mar 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Thomas, welcome to the Webmaster World Forums.

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.