PHP code example of rootchips / multichain

1. Go to this page and download the library: Download rootchips/multichain 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/ */

    

rootchips / multichain example snippets




use Chips\Multichain\Client;

$blockchain = new Client(
                    sprintf(
                    'https://%s:%s', '127.0.0.1', '4258'     // Blockchain host and port
                    ),         
                    'multichainrpc',                        // Blockchain username
                    'das858929had88yhfbw37ryw8yh3heyuhebhj', // Blockchain password
                    3
    	      );
 

 $blockchain->publish('stream1', 'key', 'data');
 

$blockchain->gettxoutdata('a92f7e9520df83999fca41f44f0e0434e9b802a54d2737b5ae548decbb49e321', 0, 1024);
>= PHP 5.4