當前位置: 首頁>>代碼示例>>PHP>>正文


PHP jsonRPCClient::listaccounts方法代碼示例

本文整理匯總了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";
    }
}
開發者ID:bitcoinbrisbane,項目名稱:EzBitcoin-Api-Wallet,代碼行數:15,代碼來源:funct_jsonrpc.php

示例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>

開發者ID:you21979,項目名稱:mona_sample,代碼行數:29,代碼來源:index.php

示例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);
開發者ID:oktoshi,項目名稱:Zen-Cart-Bitcoin-Payment-Module,代碼行數:31,代碼來源:bitcoin.php


注:本文中的jsonRPCClient::listaccounts方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。