<?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>";
static function sendToUserAddress($address, $amount, $coin) { if (!($tConfig = Yaf_Application::app()->getConfig()->api->rpcurl->{$coin})) { return false; } $tARC = new Api_Rpc_Client($tConfig); $amount = bcsub($amount, 0.0001, 4); $amount = floatval($amount); #$tARC->settxfee(0.0001); $tTxid = $tARC->sendtoaddress($address, $amount); if (strlen($tTxid) != 64 || strpos($tTxid, 'error') === 0) { return false; } return $tTxid; }