1. Go to this page and download the library: Download denpa/laravel-zeromq 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/ */
zeromq()->subscribe(['foo', 'bar'], function ($message) {
echo $message;
});
use Denpa\ZeroMQ\Facades\ZeroMQ;
$callback = function ($message) {
echo $message;
};
// use default connection
ZeroMQ::publish(['foo', 'bar'], 'hello');
ZeroMQ::pull($callback);
ZeroMQ::push('hello');
ZeroMQ::subscribe(['foo', 'bar'], $callback);
// use different connection
ZeroMQ::connection('baz')->push('hello');
'zeromq' => [
'driver' => 'zeromq',
],
bitcoind()->on('hashblock', function ($blockhash, $sequence) {
// get hash of new best block and retrieve full block info
$block = bitcoind()->getBlock($blockhash);
print_r($block->get());
});
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.