PHP code example of zyzo / meteor-ddp-php

1. Go to this page and download the library: Download zyzo/meteor-ddp-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zyzo / meteor-ddp-php example snippets


use zyzo\MeteorDDP\DDPClient;

$client = new DDPClient('localhost', 3000);

$client->connect();

$client->call("foo", array(1));
while(($a = $client->getResult("foo")) === null) {};

echo 'Result = ' . $a . PHP_EOL;

$client->stop();

"    "zyzo/meteor-ddp-php": "1.2.0"
}
shell
php composer.phar update
shell
cd tests
// install composer.phar in this folder
php composer.phar update
php [filename].php