954,587 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Online Friends Script

I have a website where users can add their friends. What I am trying to achieve is to show every user that who are their friends that are currently online. If any one knows a link to any script or tutorial that explains this, Please help.

never_rain
Newbie Poster
4 posts since Feb 2011
Reputation Points: 8
Solved Threads: 0
 

Hi

you have to create a table in sql friends for every user. in this table store detail of their Friends. And when user login to website check his id or username in these friends table if data found display the name to users

sainigks
Light Poster
35 posts since Aug 2010
Reputation Points: 10
Solved Threads: 2
 

code to set a user online
what you could do which im am gonna do is check the users are friends then on every link that user clicks it update's the (lets say) Time table with there id and the time + X mins.

now with the other friend looking to see who is online
check the time table for friends and check the friends to see if the current time is less then time + X mins if so we know that friend is online

nats01282
Junior Poster
111 posts since Jul 2009
Reputation Points: 10
Solved Threads: 0
 

code to set a user online what you could do which im am gonna do is check the users are friends then on every link that user clicks it update's the (lets say) Time table with there id and the time + X mins.

now with the other friend looking to see who is online check the time table for friends and check the friends to see if the current time is less then time + X mins if so we know that friend is online


you could also try creating a php/mysql chat with this i have done it once and it worked fair well

nats01282
Junior Poster
111 posts since Jul 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: