Author

Topic: Php Script (Read 630 times)

sr. member
Activity: 412
Merit: 287
April 24, 2014, 06:54:34 AM
#7
Just to explain what's actually happening here: When you run a bitcoind command (not RPC yet), you are technically seeing the response in JSON.

When you're submitting using the jsonRPCclient, it takes care of dealing with the intermediary JSON for you. When you're playing with the createrawtransaction RPC call, you're not passing json strings as parameters, you pass arrays. The library takes care of converting to JSON, and decoding the response.

Hence, many RPC commands are expected to return an array (although not all)
newbie
Activity: 42
Merit: 0
April 22, 2014, 08:06:28 PM
#6

 echo "Getinfo result: $get";


Notice: Array to string conversion in C:\xampp\htdocs\show balance\test.php on line 18
Getinfo result: Array

You can't echo something if it's not an integer or a string.

Use
Code:
var_dump($get);
instead




Great now is working. Thank you.


what is on line 18? I don't see anything like $getinfo[]
 
Try making your title more specific too, probably nobody even reading this.  



Got the help I needed Smiley
full member
Activity: 624
Merit: 125
alcedoplatform.com
April 22, 2014, 08:01:01 PM
#5
what is on line 18? I don't see anything like $getinfo[]
 
Try making your title more specific too, probably nobody even reading this.  

full member
Activity: 180
Merit: 100
April 22, 2014, 07:45:41 PM
#4

 echo "Getinfo result: $get";


Notice: Array to string conversion in C:\xampp\htdocs\show balance\test.php on line 18
Getinfo result: Array

You can't echo something if it's not an integer or a string.

Use
Code:
var_dump($get);
instead

newbie
Activity: 42
Merit: 0
April 22, 2014, 07:26:06 PM
#3

I saw the API calls list but I dont know how to call it. for example getting the balance works

$bitcoin = new jsonRPCClient('http://test:[email protected]:8332/');
$total = $bitcoin->getbalance();
echo "balance = $total";

If I call 'getinfo'

 $get = $bitcoin->getinfo();
 echo "Getinfo result: $get";


Notice: Array to string conversion in C:\xampp\htdocs\show balance\test.php on line 18
Getinfo result: Array
full member
Activity: 624
Merit: 125
alcedoplatform.com
April 22, 2014, 06:55:01 PM
#2
getreceivedbyaccount    [account] [minconf=1]
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list#Full_list
newbie
Activity: 42
Merit: 0
April 22, 2014, 11:08:41 AM
#1
Does anyone have any php script /or what command to call that can get all incoming transactions using the rpc daemon? Thank you.
Jump to: