PDA

View Full Version : Login Script with timer



johnbruce
January 8th, 2007, 12:36 PM
Afternoon,

What I'm looking for is a simple script that will allow a user to login and logout of a page, the thing thats most important is that I need the script to email me back the time the user logged in and the time they logged out again.

Anyone know if anything like this exists? Or how easy it would be to code?

Thanks,
John

evildrummer
January 8th, 2007, 12:39 PM
do you need the amount of time they were logged in for or when they logged in or out?

bwh2
January 8th, 2007, 12:41 PM
i would use PEAR::Auth (http://pear.php.net/package/Auth) combined with PEAR::MDB2 (http://pear.php.net/package/MDB2). use Auth to handle the authentication, then when a user logs in or out, just record it in a DB using MDB2. then you could just query the db for login/out times. emails would get heavy and unmanageable.

johnbruce
January 8th, 2007, 12:42 PM
Just when they logged in and out (time) it's all going into an excell spreadsheet so I can automatically work out durations.

shweet
January 8th, 2007, 12:43 PM
arghhh so its for data?

johnbruce
January 8th, 2007, 12:45 PM
arghhh so its for data?

Sorry I dont get what your getting at?

shweet
January 8th, 2007, 12:46 PM
you want to know how many peaople are on your site and how long for so that you can record it then recive the data and make the site better for users?

johnbruce
January 8th, 2007, 12:52 PM
you want to know how many peaople are on your site and how long for so that you can record it then recive the data and make the site better for users?

Kinda, It's for a work project to track how long employees are logged onto a PC for. We have a automatic dialler which records this but people despute the times, if we allow them to manually login and out they have to cause to complain.

shweet
January 8th, 2007, 12:53 PM
what if they dont login?

johnbruce
January 8th, 2007, 12:56 PM
Then we have the automatic system to fall back on, But knowing these lot they'll login bang on time to make sure they're paid correctly.