Path: csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!.POSTED!not-for-mail From: jimp@specsol.spam.sux.com Newsgroups: comp.lang.php Subject: Re: mouse movement detection? Date: Tue, 10 May 2011 19:40:09 -0000 Organization: Aioe.org NNTP Server Lines: 40 Message-ID: References: <5jmrvpnl392w$.dlg@evanplatt.sux> <1l6ipxzio1vee$.dlg@evanplatt.sux> NNTP-Posting-Host: 5FQzpG9PgxCHgWX2ynv4yg.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (SunOS/5.10 (i86pc)) X-Notice: Filtered by postfilter v. 0.8.2 Xref: x330-a1.tempe.blueboxinc.net comp.lang.php:1490 richard wrote: > On Tue, 10 May 2011 21:11:39 +0200, Gregor Kofler wrote: > >> Am 2011-05-10 18:57, richard meinte: >>> Just curious to know if PHP, or other script language, has a method of >>> detecting mouse movement. >> >> No server side script can detect the movement of a mouse attached to a >> client computer. >> >>> I had left a website page open all night and in the morning found I had >>> been transferred to another page that said my mouse had been idle for 10 >>> minutes. >>> I have a hunch that it was probably due more to nothing happening on the >>> page for a couple of hours. >> >> You shouldn't believe everything you read on the internet... >> >> All you did was not creating a request which could be detected by the >> server (though this request could be invoked by JS without explicit >> interaction, too). >> >> Gregor > > that's what I figured. Probably done through a cookie check. Nope, a cookie can't tell if the mouse has moved, all it can determine is that nothing had been clicked since the last reload. To detect if the mouse moved, you would have to use something client side like javascript to run a timer which resets on mouse actions and if it ever times out, cause either a reload with a send to the server that the timeout occured or a load another page. -- Jim Pennino Remove .spam.sux to reply.