Bitcoin Forum
February 20, 2018, 04:53:07 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: solved: how to send optional arguments in PHP with jsonRPC  (Read 1397 times)
winnetou
Sr. Member
****
Offline Offline

Activity: 361
Merit: 250


View Profile
July 17, 2011, 07:39:57 PM
 #1

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
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1519102387
Hero Member
*
Offline Offline

Posts: 1519102387

View Profile Personal Message (Offline)

Ignore
1519102387
Reply with quote  #2

1519102387
Report to moderator
1519102387
Hero Member
*
Offline Offline

Posts: 1519102387

View Profile Personal Message (Offline)

Ignore
1519102387
Reply with quote  #2

1519102387
Report to moderator
BCEmporium
Legendary
*
Offline Offline

Activity: 1204
Merit: 1000



View Profile
July 17, 2011, 11:58:53 PM
 #2

The proper way is:

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

██████████████████            ██████████
████████████████              ██████████
██████████████          ▄█   ███████████
████████████         ▄████   ███████████
██████████        ▄███████  ████████████
████████        ▄█████████  ████████████
██████        ▄███████████  ████████████
████       ▄██████████████ █████████████
██      ▄███████████████████████████████
▀        ███████████████████████████████
▄          █████████████████████████████
██▄         ▀███████████████████████████
████▄        ▀██████████████████████████
██████▄        ▀████████████████████████
████████▄        ████████████████▀ █████
██████████▄       ▀█████████████  ██████
████████████▄       ██████████   ███████
██████████████▄      ▀██████    ████████
████████████████▄▄     ███     █████████
███████████████████▄    ▀     ██████████
█████████████████████▄       ███████████
███████████████████████▄   ▄████████████





▄█████████████████   ███             ███   ███   ███▄                ▄███            █████            ████████████████   ████████████████▄             █████
███▀                 ███             ███   ███   ████▄              ▄████           ███████           ███                ███           ▀███           ███████
███                  ███             ███   ███   █████▄            ▄█████          ███▀ ▀███          ███                ███            ███          ███▀ ▀███
███                  ███             ███   ███   ███ ███▄        ▄███ ███        ▄███▀   ▀███▄        ███                ███           ▄███        ▄███▀   ▀███▄
███                  ███████████████████   ███   ███  ▀██▄      ▄██▀  ███       ▄███▀     ▀███▄       ████████████████   ████████████████▀        ▄███▀     ▀███▄
███                  ███             ███   ███   ███   ▀███    ███▀   ███      ▄███▀       ▀███▄      ███                ███        ███          ▄███▀       ▀███▄
███                  ███             ███   ███   ███    ▀███  ███▀    ███     ▄███▀         ▀███▄     ███                ███         ███        ▄███▀         ▀███▄
███▄                 ███             ███   ███   ███      ██████      ███    ▄███             ███▄    ███                ███          ███      ▄███             ███▄
▀█████████████████   ███             ███   ███   ███       ████       ███   ▄███               ███▄   ████████████████   ███           ███    ▄███               ███▄

|
  TRUE BLOCKCHAIN GAMING PLATFORM 
DECENTRALISED AUTONOMOUS UNIVERSES

  HOME PAGE                                                                  WHITE PAPER 
|
winnetou
Sr. Member
****
Offline Offline

Activity: 361
Merit: 250


View Profile
July 18, 2011, 07:25:46 AM
 #3

The proper way is:

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

thank you!
Clark
Hero Member
*****
Offline Offline

Activity: 540
Merit: 500


So much code.


View Profile WWW
September 21, 2011, 05:32:24 PM
 #4

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.

PGP KEY | 1Bitcoin3Tg2KWyAq3wzivdqwYqGwKYaGd
Clark
Hero Member
*****
Offline Offline

Activity: 540
Merit: 500


So much code.


View Profile WWW
January 21, 2012, 04:28:05 PM
 #5

I think this will work to select the last 25 transactions, regardless of account:

Code:
listtransactions('*',25)

PGP KEY | 1Bitcoin3Tg2KWyAq3wzivdqwYqGwKYaGd
winnetou
Sr. Member
****
Offline Offline

Activity: 361
Merit: 250


View Profile
January 21, 2012, 04:31:27 PM
 #6

I think this will work to select the last 25 transactions, regardless of account:

Code:
listtransactions('*',25)

perfect! thank you very much
terrytibbs
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500



View Profile
January 23, 2012, 01:21:10 PM
 #7

The proper way is:

  echo $bitcoin->getreceivedbylabel("user1",2);
Why oh why would you use double-quotes there?!?!
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1680
Merit: 1001

Reverse engineer from time to time


View Profile
January 23, 2012, 03:07:24 PM
 #8

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

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!