0

I am unable to connect to the Blockchain API, here is the code:

$rpc_host = 'rpc.blockchain.info';
$rpc_port = '80';
$rpc_user = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX';
$rpc_pass = 'PASSWORD';

require_once('jsonRPCClient.php');
$bc = new jsonRPCClient('http://' . $rpc_user . ':' . $rpc_pass . '@' . $rpc_host . ':' . $rpc_port);
$balance = $bc->getbalance();

I have also tried with port 443, and I still get this error (but with https://):

EXCEPTION: Unable to connect to http:[Link Breaker]//XXXXXXXX-XXXX-XXXX->XXXX-XXXXXXXXXXXX:Password@rpc.blockchain.info:80

I've tried everything I know and I've seen some people with the same problem, but no solution. Can anyone help me?

  • Uhm, obvious question: is your Bitcoin server running? – Jori Sep 7 '14 at 13:13
  • Yes it is, lol :P – user19266 Sep 7 '14 at 14:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy