本文整理匯總了PHP中jsonRPCClient::getmininginfo方法的典型用法代碼示例。如果您正苦於以下問題:PHP jsonRPCClient::getmininginfo方法的具體用法?PHP jsonRPCClient::getmininginfo怎麽用?PHP jsonRPCClient::getmininginfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類jsonRPCClient
的用法示例。
在下文中一共展示了jsonRPCClient::getmininginfo方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: jsonRPCClient
session_start();
include "config/config.php";
require_once 'jsonrpcphp/includes/jsonRPCClient.php';
include "includes/infomsg.php";
$khs = 0;
print "<html>";
print "<head>";
print "<title>Test script</title>";
print "<meta http-equiv=\"refresh\" content=\"60\" />";
print "</head>";
print "</body>";
print "<center> <img src=\"logos/" . $symbol . ".png\"></center><br/>";
print "<center><font size=\"10\">" . $name . " Faucet.</font></center><br/>";
$bitcoin = new jsonRPCClient('http://' . $user . ':' . $password . '@' . $host . ':' . $port . '/');
// print_r($bitcoin->getmininginfo());
$array = $bitcoin->getmininginfo();
$array2 = $bitcoin->getinfo();
if (array_key_exists('networkhashps', $bitcoin->getmininginfo())) {
$khs = $array['networkhashps'];
$kname = "KH's";
}
if (array_key_exists('netmhashps', $bitcoin->getmininginfo())) {
$kname = "MH's";
$khs = $array['netmhashps'];
}
/*
#Needs finishing.
#if (array_key_exists('Proof-of-Stake', $bitcoin->getinfo()))
#{
#$PoS = $array[1]['Proof-of-Stake'];
#}