PHP Classes

How to Implement a PHP Chat Application using Websocket with the Package Simple PHP Chat with Websocket: Implements a chat system using Websockets

Recommend this page to a friend!
  Info   View files Example   View files View files (518)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-06-28 (13 hours ago) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
Version License PHP version Categories
simple-php-chat-with 1.0The PHP License7Web services, Chat, PHP 7
Description 

Author

This package implements a chat system using Websockets.

It uses WebSockets to listen to chat connections.

The example system can reply to messages from other users connected to the chat system.

Picture of Adeleye Ayodeji
  Performance   Level  
Innovation award
Innovation award
Nominee: 13x

 

Example

<?php
require __DIR__ . '/../vendor/autoload.php';
require
__DIR__ . '/../src/Chat.php';
use
Ratchet\Server\IoServer;
use
Ratchet\Http\HttpServer;
use
Ratchet\WebSocket\WsServer;

   
$server = IoServer::factory(
        new
HttpServer(
            new
WsServer(
                new
Chat()
            )
        ),
       
8080
   
);

   
$server->run();


Details

simple-php-chat-with-websocket


  Files folder image Files  
File Role Description
Files folder imagebin (1 file)
Files folder imagesrc (1 file)
Files folder imagevendor (1 file, 9 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file index.php Aux. Configuration script
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file socket.php Aux. Configuration script

 Version Control Unique User Downloads  
 100%
Total:0
This week:0