Example #1
0
<?php

require_once 'Client.php';
$bitcoin = new Api_Rpc_Client('http://*****:*****@127.0.0.1:8344/');
echo "<pre>\n";
print_r($bitcoin->getinfo());
echo "</pre>";
Example #2
0
 static function getBalance($coin)
 {
     $allow_coin = array('ybc' => 0, 'btc' => 1, 'ybcin' => 2, 'ybcout' => 3);
     if (empty($coin) || !isset($allow_coin[$coin])) {
         return FALSE;
     }
     $tARC = new Api_Rpc_Client(Yaf_Application::app()->getConfig()->api->rpcurl->{$coin});
     $balance = $tARC->getinfo();
     return empty($balance) ? 0 : $balance['balance'];
 }