views:

75

answers:

1

I am using PHP + MySQL.

Is there anyway I can control concurrent user (1 user with only 1 key) to access my php page? Not allow copy the key to access from different machine into my php, how to handle this through my php sessions/cookies?

Any advise would be appreciated!

A: 

Sure you can. Create a sessiontable and perform a check on logged in users when a user attempts to login. When there is a registered session for that user allready deny the login.

The only thing you must keep in mind is session cleanups when you set a keepalive time.

Ben Fransen