1

I'm newbie to bitcoins. Im trying to get the info, as much as I can. I'm trying to get the information by using getinfo() method that is mention in api documentation. The code i have tried is mentioned below.

   require_once('jsonRPCClient.php');
        $bitcoin = new jsonRPCClient('http://identifier:identiferpass@rpc.blockchain.info:443'); 
 print_r($bitcoin->getinfo());

I have googled it but didn't find the solution. I'm not getting what is the issue in the above code.

I just want to create a hello world connection. Any suggestions will be appreciated. Thank you

  • Do you get an error, or just nothing at all? Is the jsonRPCClient.php in the right directory? – Mathias711 May 12 '14 at 12:50
  • yes it is in right directory. – user15749 May 12 '14 at 13:27
  • the error is : Fatal error: Uncaught exception 'RuntimeException' with message 'Unable to connect to identfier:password@rpc.blockchain.info:443 Error: Protocol https not supported or disabled in libcurl' in D:\wamp\www\bitcoin\jsonRPCClient.php on line 231 – user15749 May 12 '14 at 13:28
  • and one more : RuntimeException: Unable to connect to identifier:identifierpasswrd@rpc.blockchain.info:443 Error: Protocol https not supported or disabled in libcurl in D:\wamp\www\bitcoin\jsonRPCClient.php on line 231 – user15749 May 12 '14 at 13:29
  • So it looks like you cant make a connection at all. I found this site, shouldnt you make an account with password? – Mathias711 May 12 '14 at 13:35
1

You are trying to connect to http over the https port.

For HTTP use:

$bitcoin = new jsonRPCClient('http://identifier:identiferpass@rpc.blockchain.info');

For HTTPS use:

$bitcoin = new jsonRPCClient('https://identifier:identiferpass@rpc.blockchain.info');

According to the blockchain.info documentation both should work.

1

The error it is giving you tells you that you need a version of libCURL with SSL support. Download the latest version with SSL support from below, open the Zip archive, go in to the "dlls" folder and replace the DLLs in your PHP installation with the new ones. Make sure you download the one which matches the architecture of your PHP installation, not the OS. For instance if you're running the 32 bit version of PHP on a 64 bit version of Windows, you'd want the 32 bit version of libCURL with SSL support.

http://curl.haxx.se/download.html

You might need to restart IIS (or whatever web server you're using) after you replace the DLLs.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.