Project: Simple Chat System using PHP/MySQL and WebSocket with Source Code
The Simple Chat System using PHP/MySQL and WebSocket is a simple PHP/MySQL project also with the help of a web socket. The system is inspired by well-known applications or web applications such as Facebook Messenger, Skype, and Viber. In this project, the system will help you to understand how a chat system works like on how they are stored, send, and receive messages of the multiple users. Talking about the flow of the system, the chat system users must create their credentials to access the system and connects to other users. System users can simply find their desired user/s to chat with by searching the name or username of the other users and when the user finds the desired user to chat within the suggested field or the search result field, they will simply click the user of their choice and this will be redirected to conversation field. When both users do not have any conversation from the past, the thread will be automatically created when one of the users will send a new message to the other user, and if they have already a conversation before the messages will be automatically fetched from the database. With help of a web socket, this will make update the message count and conversation messages in real-time, which means if both users are online or logged into the chat system the data will be updated automatically without reloading the page. The messages that have sent will remain as unread messages until the receiver will open the conversation box and by the time the user views the messages, the unread messages will be automatically updated in to read messages.
To have an actual demo of the Simple Chat System, download the source code, and follow the instructions below on how to run the source code.
I hope this Simple Chat System project will help you with what you are looking for. Feel free to modify the source code in the way you wanted.
Explore more on this website for more Source Codes and Tutorials.
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.