Page 1 of 1

System Idle state checking in PHP

Posted: Thu Aug 09, 2007 7:34 am
by shanu_040
Hi to all,

This is my first post in this forum. I want to know how can i know that a client is in idle state(I mean keyboard and mouse is not working).

Amit

Posted: Thu Aug 09, 2007 7:54 am
by VladSun
I think you can check it only if the window (IE, FF) with your page is focused. You can then use AJAX + onmousemove + onkyeup.

Posted: Thu Aug 09, 2007 8:23 pm
by shanu_040
I am developing a system which should be able to detect that a system is in idle state (he is not using mouse and keyboard) . and after 10 mins of idle state..it should logout the person and update the database. I am using PHP 5.2.3.

Posted: Thu Aug 09, 2007 8:25 pm
by superdezign
Yes, VladSun's suggestion would be exactly what you are after. But.... Why log them out?

Posted: Fri Aug 10, 2007 12:42 am
by shanu_040
what do you mean by window(IE, FF) is focused. Can you kindly give detailed sollution so that i can move futher

Posted: Fri Aug 10, 2007 6:44 am
by VladSun
To be the active window - the one wihich gets the user input.