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


PHP jsonRPCClient::getaddressesbyaccount方法代碼示例

本文整理匯總了PHP中jsonRPCClient::getaddressesbyaccount方法的典型用法代碼示例。如果您正苦於以下問題:PHP jsonRPCClient::getaddressesbyaccount方法的具體用法?PHP jsonRPCClient::getaddressesbyaccount怎麽用?PHP jsonRPCClient::getaddressesbyaccount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在jsonRPCClient的用法示例。


在下文中一共展示了jsonRPCClient::getaddressesbyaccount方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: die

$dbusr = "Your_Username";
// database username
$dbpwd = "Your_password";
// database password
$dbtbl = "Your_DB_Name";
// database name
// connect to the database
$db_handle = mysql_connect($dbhst, $dbusr, $dbpwd) or die("cannot connect");
$db_found = mysql_select_db($dbtbl) or die("cannot select DB");
$user_session = $_SESSION['user_session'];
// set session and check if logged in
if (!$user_session) {
    $Logged_In = 2;
} else {
    $Logged_In = 7;
    $RPC_Host = "127.0.0.1";
    // host for bitcoin rpc
    $RPC_Port = "8333";
    // port for bitcoin rpc
    $RPC_User = "Your_Username";
    // username for bitcoin rpc
    $RPC_Pass = "Your_Password";
    // password for bitcoin rpc
    // dont change below here
    $nu92u5p9u2np8uj5wr = "http://" . $RPC_User . ":" . $RPC_Pass . "@" . $RPC_Host . ":" . $RPC_Port . "/";
    $Bytecoind = new jsonRPCClient($nu92u5p9u2np8uj5wr);
    $wallet_id = "zelles(" . $user_session . ")";
    $Bytecoind_Balance = $Bytecoind->getbalance($wallet_id, 6);
    $Bytecoind_accountaddresses = $Bytecoind->getaddressesbyaccount($wallet_id);
    $Bytecoind_List_Transactions = $Bytecoind->listtransactions($wallet_id, 10);
}
開發者ID:iamraghavgupta,項目名稱:WalletScript,代碼行數:31,代碼來源:auth.php

示例2: getWalletsFromAccount

 function getWalletsFromAccount($token = "Unset")
 {
     if ($token == "Unset") {
         return null;
     } else {
         $bitcoind = new jsonRPCClient('http://' . $this->__get("username") . ':' . $this->__get("password") . '@' . $this->__get("btcserver") . ':' . $this->__get("btcport") . '/');
         $newaddr = $bitcoind->getaddressesbyaccount(md5($token));
         return $newaddr;
     }
     return null;
 }
開發者ID:djbakerman,項目名稱:botjack,代碼行數:11,代碼來源:DanCoin.php

示例3: catch

		
		<?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);
                    echo '<a href="' . zen_href_link('orders.php?page=1&oID=' . $result->fields['orders_id'] . '&action=edit', '', 'NONSSL') . '">Order ' . $result->fields['orders_id'] . '</a> | Due ' . $order->fields['order_total'] * $order->fields['currency_value'] . ' BTC | Received ' . $v . ' BTC  | ' . $result->fields['orders_status_name'] . '<br />';
                    $result->MoveNext();
                }
            }
            $count++;
開發者ID:oktoshi,項目名稱:Zen-Cart-Bitcoin-Payment-Module,代碼行數:30,代碼來源:bitcoin.php


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