Overview
Build an anonymous random chat website with a PHP and MySQL script designed for simple, registration-free conversations.
Users can join with one click and get matched with another person who is currently searching. The system creates private one-to-one text chats and provides online, searching and active-chat statistics.
The script also supports photo sharing with server-side validation for file type, size and image resolution. Upload protection includes randomized filenames and an uploads-folder configuration intended to prevent PHP execution.
The mobile-friendly interface includes sound notifications for matches, messages and chat endings, along with a typing indicator hook and helpful starter-message buttons.
On the backend, anonymous users are identified with cookies and UUIDs, while separate tables handle users, chats, messages and the search queue. Flood protection and automatic cleanup help manage chat activity and stale queue entries.
The codebase can be rebranded and customized with your own text, colors, favicon and sounds for an anonymous chat or dating-style website.
Features
Random anonymous user matching through a search queue
One-click “Find a partner” matching workflow
Private one-to-one text chat
Real-time messaging using long polling via AJAX
Connect, disconnect and error system messages
Photo sharing with JPG, PNG, GIF and WebP support
Configurable photo upload size limit, with 5 MB default
Image resolution and MIME-type validation
Randomized filenames for uploaded images
Upload-folder protection against PHP execution
Sound notifications for matches, sent/received messages and chat endings
“User is typing…” indicator support
Starter phrases and question helper buttons
Auto-resizing message textarea
Mobile-optimized frontend
Online user statistics
Searching-user statistics
Active chat statistics
Anonymous identification using cookies and UUIDs
Database tables for users, chats, messages and search queue
Flood protection based on configurable message limits
Automatic cleanup of old search queue entries
Partner-left detection using last activity
SEO meta tags and keywords for anonymous chat and no-registration chat
Requirements
Web server with PHP 7.4 or newer
PHP 8.x recommended by the source
MySQL or MariaDB database
InnoDB support
PDO enabled
PHP
pdo_mysqlextensionPHP
mbstringextensionPHP
jsonextensionPHP
fileinfoextensionGD or a compatible image-processing module
Writable
/uploadsdirectoryAbility to create and configure a MySQL database and user
Ability to import the supplied
anonlov.sqldatabase fileAbility to configure database credentials in
config.phpWeb-server permissions for the uploads directory
| Category | Scripts & Code / PHP Scripts / Chat |
| First release | 06 October 2026 |
| Last update | 06 October 2026 |
| Files included | Documentation |
| Tags | anonymous chat , random chat , PHP chat script , anonymous random chat , random chat script , PHP MySQL chat , private chat , one to one chat , no registration chat , photo chat , image sharing chat , chat queue , real time chat , AJAX chat , PHP chat system , anonymous dating chat , online chat script , chat website , PHP MySQL script , chat platform |

