JSON RPC library for PHP

+2 votes
Have JSON RPC library for PHP?

I have downloaded https://github.com/aceat64/EasyBitcoin-PHP

But when  I try to connect it, it says Empty reply from server0 , 0 means cURL was unable to connect.

& because of this, I am not able to start using multichain APIs.
asked Jan 5, 2018 by dhwalin

2 Answers

0 votes

Make sure you are giving the EasyBitcoin library the correct port for your node's RPC connection. This will probably be the default-rpc-port value from your blockchain parameters.

answered Jan 7, 2018 by MultiChain
When I start node, it gives me node ip & port.

I should use that same ip & port to connect.

Right? Or else?
+2 votes

EasyBitcoin works

First try querying using curl in command prompt, if it works then go back to code and set user and password like you used in curl. I had the same error but its resolved

curl -u user:password -v -H "Content-Type: application/json" -d "{\"id\":0, \"method\":\"getinfo\",\"params\":[]}"

you can get the port by running multichain-cli chainname getinfo

Its a late response but may be it will help others. 

answered May 15, 2018 by krish