I know there is a way to check if the user leaves your webpage, but what I really need is a way to check if they are still there. I'm not quite sure how t开发者_Go百科o go about doing this.
Any help is appreciated.
You can write a call to a PHP script on regular intervals in JS letting the server know the user is still on.
This question/answers might help jquery , Ajax or PHP : Run Script at a specific time or perform action in the background
精彩评论