Page 1 of 1

lock page. possible?

Posted: Tue Oct 03, 2006 5:53 am
by yarons
Hi,

I was wondering if it was possible to lock a specific php page/script if a user is currently running it.
i.e. only 1 user can run or even access this page at a time.
I'm using php version 5.1.6 and apache 2.2.3

Thanks

Posted: Tue Oct 03, 2006 6:21 am
by Chris Corbyn
Yes. Make sure the user is running a session. Store that session ID in the database upon accessing the page, along with the timestamp. Clean up the database to remove the session ID if the timestamp associated with it is more than say 30 minutes old.