Author

Topic: Passing parameters to bitcoin daemon using php library (Read 1223 times)

legendary
Activity: 1032
Merit: 1000
Quote
Just pass the parameters in the getnewaddress() call.

Code:
$json = $bitcoin->getnewaddress("Account_Name");

Thanks for help.
kjj
legendary
Activity: 1302
Merit: 1026
Quote

 require_once 'jsonRPCClient.php';
 
  $bitcoin = new   jsonRPCClient('http://username:[email protected]:9999/');
 
   $json =$bitcoin->getnewaddress();        // here  parameter required
   var_dump($json);
  echo "";         

?>


How to pass parameter to function 'getnewaddress' ?

Just pass the parameters in the getnewaddress() call.

Code:
$json = $bitcoin->getnewaddress("Account_Name");
legendary
Activity: 1135
Merit: 1166
no one uses php with bitcoin, or is my question wrong ?

I use it (well, namecoin to be precise) but have written my own RPC call library based on the command-line tool.  I don't know about the one you use.  (I can point you to my code if you want to switch, but I guess that would be even more complicated.)
legendary
Activity: 1032
Merit: 1000
no one uses php with bitcoin, or is my question wrong ?
legendary
Activity: 1032
Merit: 1000
legendary
Activity: 1032
Merit: 1000
Quote

 require_once 'jsonRPCClient.php';
 
  $bitcoin = new   jsonRPCClient('http://username:[email protected]:9999/');
 
   $json =$bitcoin->getnewaddress();        // here  parameter required
   var_dump($json);
  echo "";         

?>


How to pass parameter to function 'getnewaddress' ?
Jump to: