Author

Topic: i get error when use sendfrom function (Read 398 times)

hero member
Activity: 826
Merit: 1000
January 23, 2014, 08:45:49 AM
#1
hi everybody

i am create a bitcoin transfer module on php. every functions work (getinfo, listaccounts,blabla) but i can not bitcoin transfer from wallet. my code is :

require_once 'jsonRPCClient.php';

$account='Test';
$toaddress='1LdmknERpJBg695CTrbVmwn1QEExgpjmaF';
$amount=0.01;
$bitcoin = new jsonRPCClient('http://xxxx:[email protected]:8332/');
$bitcoin->sendfrom((string)$account, (string)$toaddress, (float)$amount);

Everyting is ok but when open the page i get this error message:

Warning: fopen(http://[email protected]:8332/): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in C:\wamp\www\wallet\jsonRPCClient.php on line 132

But i know Bitcoin-QT is runing and other function is working properly. And there is enough balance for transfer!
Jump to: