• Stars
    star
    11
  • Rank 1,688,907 (Top 34 %)
  • Language
    HTML
  • License
    MIT License
  • Created over 5 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Example of Codeigniter WebSocket https://github.com/takielias/codeigniter-websocket

CodeIgniter WebSocket Library Example

CodeIgniter library realtime communication by using Websocket technology and Ratchet (Socketo.me & codeigniter-websocket)

πŸ“š Dependencies

  • PHP 5.6+
  • CodeIgniter Framework (3.1.* recommanded)
  • Composer
  • PHP sockets extension enabled

πŸ”° Installation

➑️ Step 1 : Library installation by Composer

Clone The Repository

git clone https://github.com/takielias/codeigniter-websocket-example.git

Run the following command in the folder of your project :

composer install

You'r almost done βœ”οΈ

Open you'r command prompt then type the command bellow in you'r project folder :

php index.php welcome index

➑️ Test the App

Open two pages of your project on following url with different IDs :

http://localhost/codeigniter-websocket-example/index.php/user/index/1

http://localhost/codeigniter-websocket-example/index.php/user/index/2

❗ In my example, recipient_id is defined by user_id, as you can see, it's the auth callback who defines recipient ids.

If you have something like that, everything is ok for you:

user_1

user_2

Bugs πŸ› or feature πŸ’ͺ

Be free to open an issue or send pull request