![]() |
|
|
+ Search |
![]()
|
Nov 28th, 2008 07:23
healthy man, Stoyan Stefanov, Guest,
Yes, it is possible and not very hard to do. By default php stores session data in files, but you can override this behaviour and define your own session handling functions that will store the session data in a database table. Then all you need to do is SELECT COUNT(*) FROM `your_session_table`; ... and you'll have the number of active sessions. Redefining session handlers may sound complicated, but you can find a nice article on how to do this on zend.com - http://www.zend.com/zend/spotlight/code-gallery-wade8.php There is a class definition you can just copy and use as is. http://www.healthdothealth.com http://www.healthxhealth.com http://www.mesotheliomainmesothelioma.com http://www.healthfirewall.com http://www.flathealth.com http://www.healthbodyguard.com