Need help building an instant messaging system with AJAX/PHP
I am trying to add an instant messaging system to my website so that logged in member can chat one-on-one with other member on his/her contact list. I am aware that there are many of such free scripts that I can use but I would rather learn to do it myself. So, could anyone please tell me how to set it up or at least where the resources are.
You should be very familiar with using php, and a database like mysql. You can have the page refresh itself periodically to get the latest list of messages. As an enhancement, you could instead use ajax to update the page.
You might consider looking at some of the existing source code to get some ideas.
Well, you need to pick a place to start. You can either go from the user interface to the functionality, or set up the mechanics and worry about the basic design later.
Either way, you should put together a list of things you need.
Insert Message into DB
Get Messages from DB
These are just general things to put together to get chat functionality - going with one on one chat would need ways of alerting users to new messages from users they're not currently watching. I'd be happy to help walk you through some of the steps to building a basic system.