PHP code example of blocktrail / blocktrail-sdk

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

    

blocktrail / blocktrail-sdk example snippets


use Blocktrail\SDK\BlocktrailSDK;

echo "123456789 Satoshi to BTC: " . BlocktrailSDK::toBTC(123456789) . " \n";
echo "1.23456789 BTC to Satoshi: " . BlocktrailSDK::toSatoshi(1.23456789) . " \n";



use Blocktrail\SDK\BlocktrailSDK;

# Install Composer
curl -sS https://getcomposer.org/installer | php

# Add the BlockTrail SDK as a dependency
php composer.phar 

  curl.cainfo = C:\php\certs\cacert.pem