Author

Topic: Newbie help with RPC and PHP (Read 1070 times)

administrator
Activity: 5222
Merit: 13032
April 12, 2011, 01:16:26 PM
#2
If I remember correctly, you use multiple parameters like this:
Code:
$send = $bitcoin->sendtoaddress("1FmxuVaSpyGk732TbKroFE4ouSebpiz3nb", 0.01);

It also might be an array:
Code:
$send = $bitcoin->sendtoaddress(array("1FmxuVaSpyGk732TbKroFE4ouSebpiz3nb", 0.01));
newbie
Activity: 37
Merit: 0
April 12, 2011, 12:48:54 PM
#1
Hi,

I am a new user and very interested in Bitcoin. I have been playing around with the RPC with PHP and I am getting a problem:

Code:

require_once 'jsonRPCClient.php';
 
  
$bitcoin = new jsonRPCClient('http://user:[email protected]:8332/');
  
  
$balance $bitcoin->getbalance();
  echo 
$balance '
'
;
  
  
$send $bitcoin->sendtoaddress("1FmxuVaSpyGk732TbKroFE4ouSebpiz3nb 0.01");
  
  echo 
$send '
'
;
  
  
$balance $bitcoin->getbalance();
  echo 
$balance '
'
;

My problem is that nothing seems to happen after the first balance is echoed. The 0.01 is not sent and the 2nd balance echo is not done.

Any help would be great.

Jump to: