Making an attempt to implement Bitcoin JSON-RPC utilizing Digital Ocean Ubuntu utilizing bitcoin model 16.
Right here is my php code
<?php
require_once('easybitcoin.php');
$bitcoin = new Bitcoin('someusername', 'somepassword');
print_r($bitcoin);
//print_r($bitcoin->getwalletinfo()());
$getinfo = $bitcoin->getblockchaininfo();
print_r($getinfo);
?>
Output
Bitcoin Object ( [username:Bitcoin:private] => someusername
[password:Bitcoin:private] => somepassword [proto:Bitcoin:private] =>
http [host:Bitcoin:private] => localhost [port:Bitcoin:private] =>
8332 [url:Bitcoin:private] => [CACertificate:Bitcoin:private] =>
[status] => [error] => [raw_response] => [response] =>
[id:Bitcoin:private] => 0 )Giving error HTTP ERROR 500
I am not a lot php conscious, I attempted enabling error reporting in php.ini however not getting errorlog.
Right here is my bitcoin.conf
rpcuser=someusername
rpcpassword=somepassword
prune=600
maxconnections=12
maxuploadtarget=20
daemon=1
server=1
keypool=10000
Bitcoin server is totally synced in prune mode, up & operating.bitcoin-cli correctly working. If anybody have new working php-bitcoind examples, please share on [email protected]
Thanks for any assist.