本文整理汇总了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;