Author

Topic: solved: how to send optional arguments in PHP with jsonRPC (Read 1518 times)

legendary
Activity: 1862
Merit: 1011
Reverse engineer from time to time
The proper way is:

  echo $bitcoin->getreceivedbylabel("user1",2);
Why oh why would you use double-quotes there?!?!
Yup, we are not evaluating a variable. But, at least the wrote the integer without making it into string Smiley
hero member
Activity: 560
Merit: 501
The proper way is:

  echo $bitcoin->getreceivedbylabel("user1",2);
Why oh why would you use double-quotes there?!?!
sr. member
Activity: 361
Merit: 250
I think this will work to select the last 25 transactions, regardless of account:

Code:
listtransactions('*',25)

perfect! thank you very much
hero member
Activity: 548
Merit: 502
So much code.
I think this will work to select the last 25 transactions, regardless of account:

Code:
listtransactions('*',25)
hero member
Activity: 548
Merit: 502
So much code.
I am working in php, and I would like to skip an optional parameter.

Say I want to get 5 transactions, but I don't care about which account was involved.

I am using php with the jsonRPCClient.php module.

All of the following DO NOT WORK:
Code:
listtransactions(array(null, 5))
listtransactions(null, 5)
listtransactions(array('count'=>5))
listtransactions(0,5)
listtransactions(5)
listtransactions(false,5)

Any help in this area would be awesome.
sr. member
Activity: 361
Merit: 250
The proper way is:

  echo $bitcoin->getreceivedbylabel("user1",2);

thank you!
legendary
Activity: 1218
Merit: 1000
The proper way is:

  echo $bitcoin->getreceivedbylabel("user1",2);
sr. member
Activity: 361
Merit: 250
Hello!

This is the code to get the balance of a bitcoin account called user1

Code:
 echo $bitcoin->getreceivedbylabel("user1");

I would like to add the optional parameter minconf=2 but I can not figure out how to do this.

Code:
 echo $bitcoin->getreceivedbylabel("user1 minconf=2");
.. is not working

Hope somebody can help me.

Thanks
Jump to: