I have figured this out, I overlooked that the wallet has no balance to send anything from
. I was able to use move though as the whole point of all this was to consolidate balances into one account. Although strangely enough I'm seeing ghost accounts that do not show up in the wallet but are listed by the RPC, oh well. For anyone following this and interested in the code, here ya go!
<?php
require_once dirname(__FILE__) . "/classes/jsonRPCClient.php";
define ("BC_HOST", "127.0.0.1");
define ("BC_USER", "***");
define ("BC_PASS", "***");
define ("BC_PORT", "8332");
$bitcoin = new jsonRPCClient("http://".BC_USER.":".BC_PASS."@".BC_HOST.":".BC_PORT);
$to = "ACCOUNT_NAME";
print_r($bitcoin->listaccounts());
echo "<hr>";
foreach($bitcoin->listaccounts() as $key=>$value){
if($bitcoin->getbalance((string)$key) > "0")
$bitcoin->move((string)$key, (string)$to, (float)$value);
echo "$key => ".(float)$value."<br>";
}
?>
This simply moves all balances from accounts greater than 0 into the account you tell it to. I would really like to settle the negative accounts somehow, but I'll get into that soon. Needed this because on my bank project I have been working on my account shows I have a value > 0, but the wallet total shows 0...