PHP code example of aflorea4 / block_io-php

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

    

aflorea4 / block_io-php example snippets




$apiKey = "YOUR API KEY FOR DOGECOIN, BITCOIN, OR LITECOIN";
$pin = "YOUR SECRET PIN";
$version = 2; // the API version to use

$block_io = new BlockIo($apiKey, $pin, $version);

echo "Confirmed Balance: " . $block_io->get_balance()->data->available_balance . "\n";

$balance = $block_io->get_balance(array('label' => 'default'));
echo $balance->data->available_balance . "\n";

$withdraw = $block_io->withdraw(array('amount' => '50.0', 'to_address' => 'WALLET-ADDRESS-HERE'));