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