PHP code example of alleochain / multichain-jsonrpc
1. Go to this page and download the library: Download alleochain/multichain-jsonrpc 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/ */
alleochain / multichain-jsonrpc example snippets
# Create new instance
$instance = new AlleoChain\Multichain\JsonRPC\Client([
'url' => 'http://127.0.0.1:7208',
'user' => 'rpcuser',
'pass' => 'rpcpass',
'chain' => 'test'
]);
# Get blockchain info
print_r($instance->getinfo());
# For MultiChain streams
print_r($instance->liststreamitems('test_stream'));