A nice little handy opensource bit of code........
This seems to work good on calling one response items such as getconnectioncount where just one figure is needed, but I am trying to display on my website single bits of information.
So I am stuck here
require_once('easybitcoin.php');
$bitcoin = new Bitcoin('user','pass','localhost','port');
$getinfo = $bitcoin->getinfo();
print_r($getinfo);
This of coarse returns something similar to this:
Array ( [version] => 1040203 [protocolversion] => 70929 [services] => NETWORK/BLOOM/ [walletversion] => 169900 [balance] => 6000.96068 [zerocoinbalance] => 0 [staking status] => Staking Active [blocks] => 1823565 [timeoffset] => 0 [connections] => 242 [proxy] => [difficulty] => 114235.22515094 [testnet] => [moneysupply] => 1114119657.5589 [keypoololdest] => 1666243740 [keypoolsize] => 99 [paytxfee] => 0 [relayfee] => 0.0001 [errors] => )
So my question is what would I alter here to get "staking status" for example:
$getinfo = $bitcoin->getinfo();
I have tried allsorts such as:
$getinfo = $bitcoin->getinfo(stakingstatus);
$getinfo = $bitcoin->getinfo->stakingstatus();
$getinfo = $bitcoin->getinfo=>stakingstatus();
But to no avail, so if anyone could point me int the correct direction I woud be very grateful
Thanks
TT