本文整理匯總了PHP中jsonRPCClient::sc_getnewaddress方法的典型用法代碼示例。如果您正苦於以下問題:PHP jsonRPCClient::sc_getnewaddress方法的具體用法?PHP jsonRPCClient::sc_getnewaddress怎麽用?PHP jsonRPCClient::sc_getnewaddress使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類jsonRPCClient
的用法示例。
在下文中一共展示了jsonRPCClient::sc_getnewaddress方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: VALUES
// 4.1.1 Create deposit address
$group = mysql_real_escape_string($_GET["g"], $db);
if ($_GET["m"] != "yes") {
$mail = "no";
} else {
$mail = "yes";
}
$callback = mysql_real_escape_string($_GET["c"], $db);
$data = mysql_real_escape_string($_GET["d"], $db);
if (strlen($data) > 1024) {
json_error("Data too long.");
}
if (strlen($group) > 255) {
json_error("Group too long.");
}
$address = $solidcoin->sc_getnewaddress("main");
$ins_transfer_deposit_address_a = "INSERT INTO transfer_deposit_address (user, `group`, address, callback, send_mail, creation_time, data) VALUES ('{$user_id}', '{$group}', '{$address}', '{$callback}', '{$mail}', NOW(), '{$data}')";
mysql_query($ins_transfer_deposit_address_a);
$id = mysql_insert_id();
json_success(array("id" => $id, "address" => $address));
}
if ($query[2] == "info") {
if (!get_lock("global")) {
json_error("Too many queries. Please try again later.");
}
if (isset($_GET["id"])) {
// 4.1.2 Get deposit address info by ID
$id = $_GET["id"];
if (!is_numeric($id)) {
json_error("Invalid id");
}