NOTICE : This project is NOT production ready.
This library contains the demo of commenting/posting realtime using CodeIgniter-Ratchet-Websocket with AngularJS as client-side javascript framwork.
There is no rocket science I have done to achieve this.
As you know the CodeIgniter Directory Structure
There is a folder calledCI--application-third_party-Realtime (I put here Ratchet PHP Websocket Library)
I put my code here and just call that code using Javascript websocket.
Download the code.
You got a database script with name "realtime.sql", just import that script into your database named "realtime" (You may use your name but you have to change database name in CodeIgniter's database.php also.
Put the downloaded code in your web root folder (www or htdocs... whatever it may be).
Gotoapplication/config/constants.php
Change the constant BROADCAST_URL and set it as IP of your own computer.
application/third_party/Realtime/bin/server.php
We have to run that server.php file from command prompt.
Just move to that folder by using "cd" command.
c:/>cd xampp\htdocs\ci-ratchet\application\third_party\Realtime\bin
Press enter.. Now you are in that directory specifically, just run following command.
c:\xampp\htdocs\ci-ratchet\application\third_party\Realtime\bin>php server.php
If its error free and noting is populated, then its supposed that you got the success to start the websocket server.
http://localhost/ci-ratchet/
Once AngularJS initialize, you can see the Textbox, just start typing and press enter.... VOLLAAAAAAAAA
Its working
Check it in another browser for realtime experience.
It has some permission issues on shared hosting, so it will gives throw some error. Check issue @ https://github.com/ratchetphp/Ratchet/issues/409
It will work for sure if you have same user for your VPS and shared hosting space.
CodeIgniter 3.x PHP Framework (https://www.codeigniter.com/)
Ratchet - Websocket for PHP (http://socketo.me/) by Chris Boden(@boden_c)
AngularJS - A superheroic Javascript MVW Framework by Google
I have added 3 new files in the same project for better understanding in.
application/controllers/jquery.php
application/views/jquery.php
assets/app/Connection2.js
Ratchet 可使用简单的 HTML、JS 和 CSS 来制作一个 iPhone 应用的原型。 例如你可使用如下代码: List item 1 ButtonList item 2 ButtonList item 3 ButtonList item 4 Button 来生成这样的界面:
Ratchet 是一个松耦合的 PHP 库,提供了用于创建实时、双向客户端服务器 WebSockets 应用的支持。 示例代码: <?phpnamespace MyApp;use Ratchet\MessageComponentInterface;use Ratchet\ConnectionInterface;class Chat implements MessageComponentInterf
An app demo build with Gulp, React, Ratchet. Build Execute init.sh to install core gulp plugins。 Execute gulp command to build all source。 Open public/views/login.html or register.html in Chrome's dev
jest-coverage-ratchet Raises jest's minimum coverage thresholds (per category) if current coverage is higher. What does it do? Lets say you have some jest coverage thresholds set in the package.json f
Conference Call A conference call implementation using WebRTC, Ratchet Web Socket. Getting Started Run composer install to install the dependencies. Set your web socket domain name and port in ws/bin/