Jump to content
Sign in to follow this  
bobtutos

Detect whether user is online/offline or typing

Recommended Posts

Dear all,

 

Detect whether user is online/offline or typing

 

I am working with php/mysql,jquery and actual want to advance my php skill,

 

Now I am interested in doing something similar with fb chat which tells you if the receiver seen your message and it notifies when somebody is typing to you back.

 

Also I want to detect whether user is online/offline

I know here is the right place to be helped,

 

if anyone can give me the URL to where this kind of discussion had been made or provide me with tutorial or any hints that could help me to achieve this.

 

Your helps are highly appreciated

 

Thank you.

Share this post


Link to post
Share on other sites

You can't really detect when someone is offline, there are only workarounds for it. For example, you can set up an ajax request that sends every 30 seconds, and once it stops sending you consider them offline. Those kinds of things mean you need to store the last activity time in your database and then you can check to find everyone who has activity within the past minute or so, and consider them online. You can use key events like keyup, keydown, and keypress to detect when someone is typing and use an ajax request to send that information to store in your database.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...