I'm trying to use Blockchain.info's JsonRPC API,
Code:
require_once 'jsonRPCClient.php';
$user = "************************************";
$pass = "***********";
$host = "rpc.blockchain.info";
$port = 443;
$url = "https://{$user}:{$pass}@{$host}:{$port}";
$rpc = new jsonRPCClient("{$url}");
It works with some methods such as getblockcount, like this:
$do = $rpc->getblockcount();
echo var_dump($do);
But it doesn't work on many methods such as getinfo:
$do = $rpc->getinfo();
echo var_dump($do);
(I get error: Undefined index: id jsonRPCClient.php on line 151)
What am I doing wrong here?
Am I missing something?
Aucun commentaire:
Enregistrer un commentaire