user can only login one pc at a time

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
reecec
Forum Contributor
Posts: 218
Joined: Sun Apr 02, 2006 7:12 am

user can only login one pc at a time

Post by reecec »

hi all,

I have a login system that i dont want users to share logins so I am doing it like this is this correct

When they login they get added to the online user list in a database they have a time stamp

when they are accessing a script the script updates the timestamp

while at login if someone tryes to login firstly it deletes all users on that have not been active for 10 mins then with that username it checks the rows if its not 0 they cant login.

but for this to work i am going to have to make the current loged in users sessions time out after 10 mins of no activity otherwise they can carry on and it will be updating the same row and many users could still come in once they have waited 10 mins of no activity.


sorry if i have explained it badly

is this the way to do it

thanks reece
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Yes, that's the rough idea.
Post Reply