I'm trying to use the Bitcoind JSON-RPC API from PHP to control my wallet using the following code.
<?php
echo "hello";
require_once 'jsonRPCClient.php';
$bitcoin = new jsonRPCClient('http://bitcoinrpc:password@127.0.0.1:8332/');
echo "Received: ".$bitcoin->getnewaddress()."\n";
?>
Which just prints out hello
and not even Recieved:
. You can view it here.
My bitcoin.conf:
rpcuser=bitcoinrpc
rpcpassword=password
alertnotify=echo %s | mail -s "Bitcoin Alert" admin@foo.com
server=1
What is happening exactly and how can I fix it?