本文整理汇总了PHP中jsonRPCClient::sc_listtransactions方法的典型用法代码示例。如果您正苦于以下问题:PHP jsonRPCClient::sc_listtransactions方法的具体用法?PHP jsonRPCClient::sc_listtransactions怎么用?PHP jsonRPCClient::sc_listtransactions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jsonRPCClient
的用法示例。
在下文中一共展示了jsonRPCClient::sc_listtransactions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
include "inc/format.php";
include "inc/fees.php";
include "inc/account.php";
include "inc/send_mail.php";
include "inc/json/jsonRPCClient.php";
include "inc/process_cryptotransaction.php";
get_connection();
if (!get_lock("global")) {
die("Too many queries. Please try again later.");
}
?>
<pre>
Solidcoin:
<?php
$solidcoin = new jsonRPCClient("http://USERNAME:PASSWORD@127.0.0.1:7556/");
$transactions = $solidcoin->sc_listtransactions("main", "", 100);
foreach ($transactions as $transaction) {
$transaction["amount"] /= 10000;
if ($transaction["amount"] > 500) {
if ($transaction["category"] == "receive" && $transaction["confirmations"] >= 6) {
process_cryptotransaction($transaction["txid"], $transaction["address"], $transaction["amount"], $transaction["time"], "SLC");
}
} elseif ($transaction["amount"] > 5) {
if ($transaction["category"] == "receive" && $transaction["confirmations"] >= 4) {
process_cryptotransaction($transaction["txid"], $transaction["address"], $transaction["amount"], $transaction["time"], "SLC");
}
} else {
if ($transaction["category"] == "receive" && $transaction["confirmations"] >= 2) {
process_cryptotransaction($transaction["txid"], $transaction["address"], $transaction["amount"], $transaction["time"], "SLC");
}
}