• Stars
    star
    11
  • Rank 1,694,829 (Top 34 %)
  • Language
    HTML
  • License
    MIT License
  • Created over 5 years ago
  • Updated about 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