Ich möchte mit folgendem Code Bitcoin über ein php Script versenden:
Code:
require_once '../jsonRPCClient.php';
$bitcoin = new jsonRPCClient('http://*user*:*pass*@127.0.0.1:8332/');
...
...
var_dump($bitcoin->walletlock());
var_dump($bitcoin->walletpassphrase($password,10));
var_dump($bitcoin->sendtoaddress($to,$amount));
var_dump($bitcoin->walletlock());
Code:
NULL
NULL
Warning: fopen(http://...@127.0.0.1:8332/): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error
in ***/jsonRPCClient.php on line 132
Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to http://*user*:*pass*@127.0.0.1:8332/' in ***/jsonRPCClient.php:140
Stack trace:
#0 [internal function]: jsonRPCClient->__call('sendtoaddress', Array)
#1 ***/content/bitcoin.php(79): jsonRPCClient->sendtoaddress('1Ln1a2exAmTumnF...', '1')
#2 ***/index.php(470): require('***...')
#3 {main}
thrown in ***/jsonRPCClient.php on line 140
Gibt es außerdem eine Übersicht welche Return-Values der einzelnen Funktionen welchem Ergebnis zugeordnet sind? Kein Rückgabewert ist nämlich nicht sehr aussagekräftig.
Wär schön wenn mir jemand hiermit helfen könnte und mich auf meinen (Denk)Fehler hinweisen könnte.
Die bitcoind version ist übrigens 0.5.1-beta
Vielen Dank!