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
shanu_040
Forum Newbie
Posts: 3 Joined: Thu Aug 09, 2007 7:18 am
Post
by shanu_040 » Thu Aug 09, 2007 7:34 am
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
VladSun
DevNet Master
Posts: 4313 Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria
Post
by VladSun » Thu Aug 09, 2007 7:54 am
I think you can check it only if the window (IE, FF) with your page is focused. You can then use AJAX + onmousemove + onkyeup.
There are 10 types of people in this world, those who understand binary and those who don't
shanu_040
Forum Newbie
Posts: 3 Joined: Thu Aug 09, 2007 7:18 am
Post
by shanu_040 » Thu Aug 09, 2007 8:23 pm
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.
superdezign
DevNet Master
Posts: 4135 Joined: Sat Jan 20, 2007 11:06 pm
Post
by superdezign » Thu Aug 09, 2007 8:25 pm
Yes, VladSun's suggestion would be exactly what you are after. But.... Why log them out?
shanu_040
Forum Newbie
Posts: 3 Joined: Thu Aug 09, 2007 7:18 am
Post
by shanu_040 » Fri Aug 10, 2007 12:42 am
what do you mean by window(IE, FF) is focused. Can you kindly give detailed sollution so that i can move futher
VladSun
DevNet Master
Posts: 4313 Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria
Post
by VladSun » Fri Aug 10, 2007 6:44 am
To be the active window - the one wihich gets the user input.
There are 10 types of people in this world, those who understand binary and those who don't