A lightweight, PHP-based live chat system that's simple, powerful, and easy to manage. Fully self-hosted and plug-and-play, no database setup required. Ideal for small businesses.
livechat/
├── config/database.php
├── admin/
│ ├── index.php (login)
│ ├── dashboard.php
│ ├── settings.php
│ └── logout.php
├── api/
│ ├── send_message.php
│ ├── get_messages.php
│ ├── admin_reply.php
│ └── get_chats.php
├── assets/
│ ├── style.css
│ ├── admin.css
│ ├── chat.js
│ ├── admin.js
│ ├── notification.mp3 (your sound file)
│ └── message-icon.svg (your SVG file)
├── widget.php
└── install.php
- ✅ Red floating icon with customizable colors
- ✅ Popup with banner text (editable from admin)
- ✅ Name/email collection before chat
- ✅ Real-time messaging
- ✅ Notification dot for new admin replies
- ✅ Sound notifications
- ✅ Mobile responsive
- ✅ Secure login system
- ✅ WhatsApp-style layout (chat list + messages)
- ✅ Real-time message updates
- ✅ Email notifications with user message + admin reply
- ✅ Sound notifications for new messages
- ✅ Chat sorting (newest messages first)
- ✅ Change admin credentials
- ✅ Customize icon colors and position
- ✅ Edit banner text
- ✅ Full SMTP configuration
- ✅ Support for third-party email services
- Create a folder called livechat in your website root
- Upload all the files maintaining the folder structure
- Set folder permissions to 755 or 777
- Visit: yoursite.com/livechat/install.php
- You should see "Installation complete! Default login: admin/admin123"
- Delete install.php after running it
Add this code before the closing </body> tag on pages where you want the chat:
<?php include 'livechat/widget.php'; ?>Or use JavaScript inclusion:
<script>
(function() {
var iframe = document.createElement('iframe');
iframe.src = '/livechat/widget.php'; // Ensure this path is correct
iframe.style.cssText = 'position:fixed;bottom:0;right:0;width:100%;height:100%;border:none;pointer-events:none;z-index:9999';
iframe.onload = function() {
this.style.pointerEvents = 'auto';
this.style.maxHeight = '1000px'; // or this.style.height = '1000px';
this.style.maxWidth = '800px'; // or this.style.width = '800px';
};
document.body.appendChild(iframe);
})();
</script>- Visit:
yoursite.com/livechat/admin/ - Default login:
admin/admin123 - Change these credentials immediately from Settings!
- Gmail: smtp.gmail.com, Port: 587
- Yahoo: smtp.mail.yahoo.com, Port: 587
- Outlook: smtp-mail.outlook.com, Port: 587
- Third-party services: ServerSMTP.com, SendFox, etc.
- ✅ SQLite database (no MySQL needed)
- ✅ Optimized for free hosting (slow AJAX - 3-5 second intervals)
- ✅ Mobile responsive design
- ✅ Real-time notifications
- ✅ Email integration
- ✅ Secure admin authentication
- ✅ Customizable appearance
The system is fully ready to use. At this time, there are no plans to add new features. However, future updates may include UI enhancements for both the chat widget and the admin panel. Contributions are welcome! Feel free to open issues or submit pull requests.
This project is licensed under the MIT License.
