本文整理匯總了PHP中jsonRPCClient::transfer方法的典型用法代碼示例。如果您正苦於以下問題:PHP jsonRPCClient::transfer方法的具體用法?PHP jsonRPCClient::transfer怎麽用?PHP jsonRPCClient::transfer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類jsonRPCClient
的用法示例。
在下文中一共展示了jsonRPCClient::transfer方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: header
$hasta = number_format(round($balanceDisponible / $dividirEntre, 8), 2, '.', '');
if ($hasta > $maxReward) {
$hasta = $maxReward;
}
if ($hasta < $minReward + 0.1) {
header("Location: ./?msg=dry");
exit;
}
$aleatorio = GetRandomValue($minReward, $hasta);
$cantidadEnviar = $aleatorio * $dividirEntre - $transactionFee;
$destination = array("amount" => $cantidadEnviar, "address" => $wallet);
$date = new DateTime();
$timestampUnix = $date->getTimestamp() + 5;
$peticion = array("destinations" => $destination, "payment_id" => $paymentID, "fee" => $transactionFee, "mixin" => 6, "unlock_time" => 0);
//print_r($peticion);
$transferencia = $bitcoin->transfer($peticion);
if ($transferencia == "Bad address") {
header("Location: ./?msg=wallet");
exit;
}
if (array_key_exists("tx_hash", $transferencia)) {
$query = "INSERT INTO `payouts` (`payout_amount`,`ip_address`,`payout_address`,`payment_id`,`timestamp`) VALUES ('{$cantidadEnviar}','{$direccionIP}','{$wallet}','{$paymentID}',NOW());";
mysqli_query($link, $query);
mysqli_close($link);
header("Location: ./?msg=success&txid=" . $transferencia['tx_hash'] . "&amount=" . $aleatorio);
exit;
} else {
}
} else {
header("Location: ./?msg=captcha");
exit;