Author

Topic: Stupid question about doing a transaction with php rpc (Read 918 times)

full member
Activity: 162
Merit: 100
Ah, It works!

My $account was a integer and I just needed to convert it to a string and now it works like a charm. Thanks Gavin.
legendary
Activity: 1652
Merit: 2311
Chief Scientist
Looks ok to me, assuming $account and $address are strings and $amount is a number.

full member
Activity: 162
Merit: 100
                              


Assume that $account is a account with a balance in my bitcoind, $address is a valid address and that $amount is the amount of bitcoin that should be sent, I'm wondering if the following is the correct way to do a transaction using php:



  require_once 'jsonRPCClient.php';
  $bitcoin = new jsonRPCClient('http://usr:[email protected]:8332/');
  $transaction = $bitcoin->sendfrom($account, $address, $amount);
  echo $transaction; // doing a echo to see the respone

Or am I doing anything wrong?
Jump to: