How to install Ratchet WebSockets for PHP on MAMP or XAMPP?

I am trying to integrate real-time chat into my php / backbone application and I thought I would use ratchet? What do I need to do to install Ratchet in MAMP or XAMPP? The only documentation provided on their website is to use CURL, but I don’t know how to install the necessary resources for localhost, and I don’t know where to add these resources. Any advice would be appreciated.

+5
source share
2 answers

You must install composer.phar in the root directory of your project.

linux, curl -s https://getcomposer.org/installer | php, Windows

, , "composer.json", , . Ratchet, json :

{
    "require": {
        "cboden/Ratchet": "0.2.*"
    }
}

, php composer.phar install.

Ratchet "vendor".

Rathet php :

require __DIR__ . '/vendor/autoload.php';

, !

+5

cURL MAMP XAMPP, MAMP XAMPP - - + , PHP. Ratchet WebSockets , -.

, php, , /.

: http://socketo.me/docs/install

0

All Articles