- May 29, 2004
- 2,428
- 0
- 0
Hello Everyone!
I have a .htpasswd setup with username:encryptedpassword format. Simply put, if someone tries to access members_only.php then it will immediately prompt them for their username and password (which i manually put into the .htpasswd and e-mailed to them).
I would like to log each and everytime someone logs in, into a log file. For example, if I gave out usernames "johndoe" and "janedoe" to two different people, and "johndoe" logs in today at 10:00am then the log would look something like this:
johndoe 8/3/2006 10:00am
Lets say 5 minutes later "janedoe" logs into the page. The log file would then look like this:
johndoe 8/3/2006 10:00am
janedoe 8/3/2006 10:05am
and then if johndoe logs in a week later (with no one logging in in that week's time)
johndoe 8/3/2006 10:00am
janedoe 8/3/2006 10:05am
johndoe 8/10/2006 10:00am
I hope you understand what I am after. If someone can provide some assistance on having a log file of each time a username logs in, that would be absolutely fantastic and would be greatly appreciated. Thanks,
I have a .htpasswd setup with username:encryptedpassword format. Simply put, if someone tries to access members_only.php then it will immediately prompt them for their username and password (which i manually put into the .htpasswd and e-mailed to them).
I would like to log each and everytime someone logs in, into a log file. For example, if I gave out usernames "johndoe" and "janedoe" to two different people, and "johndoe" logs in today at 10:00am then the log would look something like this:
johndoe 8/3/2006 10:00am
Lets say 5 minutes later "janedoe" logs into the page. The log file would then look like this:
johndoe 8/3/2006 10:00am
janedoe 8/3/2006 10:05am
and then if johndoe logs in a week later (with no one logging in in that week's time)
johndoe 8/3/2006 10:00am
janedoe 8/3/2006 10:05am
johndoe 8/10/2006 10:00am
I hope you understand what I am after. If someone can provide some assistance on having a log file of each time a username logs in, that would be absolutely fantastic and would be greatly appreciated. Thanks,