本文整理汇总了PHP中jsonRPCClient::listaccounts方法的典型用法代码示例。如果您正苦于以下问题:PHP jsonRPCClient::listaccounts方法的具体用法?PHP jsonRPCClient::listaccounts怎么用?PHP jsonRPCClient::listaccounts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jsonRPCClient
的用法示例。
在下文中一共展示了jsonRPCClient::listaccounts方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: funct_Billing_JSONRPC_ListAccounts
function funct_Billing_JSONRPC_ListAccounts($intConfirmationsCountMin)
{
//give address and minimum confirmations it must have and get the balance of that address
if (!$intConfirmationsCountMin) {
$intConfirmationsCountMin = 0;
}
$mybtc = new jsonRPCClient(JSONRPC_CONNECTIONSTRING);
try {
//return print_r($mybtc->listaccounts($intConfirmationsCountMin) );
$objJSON = $mybtc->listaccounts($intConfirmationsCountMin);
return $objJSON;
} catch (Exception $e) {
echo nl2br($e->getMessage()) . '<br />' . "\n";
}
}
示例2: jsonRPCClient
ユーザー名:
<input type=text size="40" name="username" value=""><br />
<input type="submit" name="param" value="アドレス取得">
<input type="submit" name="param" value="入金チェック">
</form>
<?php
require_once __DIR__ . '/jsonRPCClient.php';
$host = 'localhost';
/* monacoind 又は monacoin-qt を実行中のホストのアドレス */
$rpcuser = 'monacoinrpc';
/* monacoin.conf で指定した rpcユーザー名 */
$rpcpassword = 'aaaaa';
/* monacoin.conf で指定した rpcパスワード */
$rpcport = '4000';
/* monacoin.conf で指定した rpcポート */
$historyNum = 50;
/* 取得するトランザクション数 */
/* monacoind への接続アドレス */
$coindaddr = "http://{$rpcuser}:{$rpcpassword}@{$host}:{$rpcport}/";
$coind = new jsonRPCClient($coindaddr);
$info = $coind->getinfo();
echo "Balance: <div id=balance>{$info['balance']}</div>";
$list = $coind->listaccounts();
print_r($list);
?>
<div id="COUNTDOWN">0</div>
<div id="BTCMONA">wait</div>
</body>
</html>
示例3: catch
?>
<h1 class="pageheading">Bitcoin Accounts</h1>
<table border="0">
<tr class="dataTableHeadingRow"><td class="dataTableHeadingContent" align="center">Account</td><td class="dataTableHeadingContent">Address</td><td class="dataTableHeadingContent">Balance</td></tr>
<?php
try {
$bitcoin->getinfo();
} catch (Exception $e) {
echo 'Error: Bitcoin server is down. Please email system administrator.';
$down = true;
}
if (!$down) {
global $db;
$accounts = $bitcoin->listaccounts();
//print_r($accounts);
$count = 0;
foreach ($accounts as $a => $t) {
//if($a!==''){
$bc = $bitcoin->getaddressesbyaccount($a);
print '<tr><td align="left">' . $a . '</td><td border="1px">';
foreach ($bc as $b) {
$v = $bitcoin->getreceivedbyaddress($b);
print $b . '<br />';
$sql = 'SELECT * FROM ' . TABLE_ORDERS_STATUS_HISTORY . ' AS osh LEFT JOIN ' . TABLE_ORDERS_STATUS . ' AS os ON os.orders_status_id = osh.orders_status_id WHERE os.orders_status_name = "' . Pending . '" AND osh.comments LIKE "%' . $b . '%"';
$result = $db->Execute($sql);
if ($result->RecordCount() > 0) {
while (!$result->EOF) {
$sql = 'SELECT * FROM ' . TABLE_ORDERS . ' LEFT JOIN ' . TABLE_ORDERS_STATUS . ' on orders_status_id WHERE orders_id = ' . $result->fields['orders_id'] . ' AND orders_status = "1"';
$order = $db->Execute($sql);