Bitcoin Forum
September 20, 2024, 05:14:15 AM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1] 2 »
1  Bitcoin / Development & Technical Discussion / How to read wallet.dat in PHP? on: March 23, 2014, 05:23:38 PM
I am trying to read content of wallet.dat in PHP and I have search around and it seems surprisingly no one has mention it before.

I have this code which I am trying to loop around all the key/values in wallet.dat but I only get one key, "main". I guess main seems to be logical db name. ( https://github.com/bitcoin/bitcoin/blob/v0.9.0/src/db.cpp#L260 ) Do anyone know why it only finds main and not other key/values? The wallet is unencrypted.

Code
Code:
<?php
print_r
(dba_handlers(true));

$id dba_popen("wallet.dat""r""db4");

if (!
$id) {
    echo 
"dba_open failed\n";
    exit;
}

$key dba_firstkey($id);
$keys = array();
while (
$key != false) {
    
$value dba_fetch($key$id);
    
$keys[] = array($key$value);
    
$key dba_nextkey($id);
}

print_r($keys);

dba_close($id);

Output
Code:
Array
(
    [db4] => Berkeley DB 4.8.24: (August 14, 2009)
)
Array
(
    [0] => Array
        (
            [0] => main
            [1] => 
        )

)

I ran this in XAMPP 1.7.3 which has PHP 5.3.1 and php_dba.dll
2  Economy / Currency exchange / [WTB] BTC for Skrill on: April 06, 2013, 08:22:56 AM
PM me with your price, amount
3  Economy / Gambling / PLY.se - round 4 - NOW with 30% JACKPOT!! on: August 21, 2011, 03:42:01 PM
http://ply.se/

30% JACKPOT!!
4  Economy / Gambling / [NEW SITE] ply.se - round 2 on: August 16, 2011, 09:13:18 PM
Many rounds dies quickly at Bitcoinduit. So to make it more fun and longer, I made a site that have one round you can focus on. This site uses bitcoinduit.

Go and check it out!
http://ply.se/
5  Economy / Gambling / [ENDED]Longest Trip Game on: August 13, 2011, 05:39:05 PM
http://www.bitcoinduit.com/game/viewRound.php?id=Longest_Trip

Lets make this the longest trip!

Minimum Deposit: 0.5000 BTC
Maximum Deposit: 2.0000 BTC
6  Economy / Gambling / [ENDED]big bets on: August 11, 2011, 06:56:42 AM
http://www.bitcoinduit.com/game/viewRound.php?id=Big_bets

Big bets
ROI: 20%
Jackpot: 5%
Minimum Deposit: 2.0000 BTC
Maximum Deposit: 7.0000 BTC
7  Economy / Gambling / [ENDED] TODAY 20:00 (8PM) GMT on: August 08, 2011, 01:56:01 PM
I am going to create a game on Bitcoinduit at 20:00 GMT today (Bitcoinduit server time)
Im announcing this beforehand so we get some more player and it makes more fair to everyone to get ready.

The game will be

ROI: 20%
Jackpot: 5%
Minimum Deposit: 0.3000 BTC
Maximum Deposit: 1.5000 BTC
Expiration: 24 hours of inactivity

URL will be posted here: http://www.bitcoinduit.com/game/viewRound.php?id=Monday_Rush
8  Economy / Gambling / [ENDED]1.28x Game on: August 06, 2011, 03:54:53 PM
http://www.bitcoinduit.com/game/viewRound.php?id=Big_shots

Big shots Smiley
Minimum Deposit: 1.0000 BTC
Maximum Deposit: 1.5000 BTC
9  Economy / Gambling / [ENDED][Round 2]This time 2x and higher Jackpot! on: August 04, 2011, 11:59:50 AM
http://bitcoinduit.com/game/viewRound.php?id=Jackpot_2X

Jackpot: 15%
Minimum Deposit: 0.2000 BTC
Maximum Deposit: 2.0000 BTC
Expiration: 48 hours of inactivity
10  Economy / Gambling / [ENDED]1.15x with Jackpot on: August 03, 2011, 08:17:32 AM
http://www.bitcoinduit.com/game/viewRound.php?id=Jackpot

ROI: 15%
Fees: 12.0%
Minimum Deposit: 0.7000 BTC
Maximum Deposit: 1.0000 BTC
Expiration: 12 hours of inactivity

Half of the fee will go to jackpot and the jackpot goes to the last player who deposited.
11  Economy / Gambling / NEW 1.5X on Bitcoinduit on: August 02, 2011, 08:13:59 AM
http://www.bitcoinduit.com/game/viewRound.php?id=Real_deal

ROI: 50%
Fees: 4.0%
Minimum Deposit: 0.1000 BTC
Maximum Deposit: 0.7500 BTC
Expiration: 168 hours of inactivity
12  Bitcoin / Development & Technical Discussion / getbalance and getreceivedbyaccount on: July 30, 2011, 04:18:49 PM
What is the difference between RPC command "getbalance account" and "getreceivedbyaccount account"?
13  Bitcoin / Bitcoin Technical Support / [solved]Can 'getbalance' be less than 'getbalance "account"'? on: July 30, 2011, 03:01:34 PM
Can RPC command 'getbalance' be less than 'getbalance "account"'?
14  Bitcoin / Development & Technical Discussion / [BUG] RPC getaccountaddress - not same as GUI? on: July 30, 2011, 01:54:30 PM
I have created some accounts via bitcoin client GUI. When I use the RPC command getaccountaddress to get the address, it creates a new address instead and when I try to rename the new address created by RPC via GUI it renames in GUI but still not via RPC.

Example
Lets say I have
Account        Address
Test             1BmAsnzVSfXd4xg6n3ufkEaRCD4advdgqg

I now call RPC getaccountaddress Test. It return a new address (1BUDcUr1WR6H12Vot7qprZoWeZUBunPuMg)

Now I have two accounts
Account        Address
Test             1BmAsnzVSfXd4xg6n3ufkEaRCD4advdgqg
Test             1BUDcUr1WR6H12Vot7qprZoWeZUBunPuMg

If I rename the new address (1BUDcUr1WR6H12Vot7qprZoWeZUBunPuMg) to Test2 in GUI and then call RPC getaccountaddress Test it still return 1BUDcUr1WR6H12Vot7qprZoWeZUBunPuMg


Im using win vista and the portable bitcoin client 0.3.24.
15  Economy / Digital goods / Selling .se domains on: July 17, 2011, 12:52:09 PM
Selling one .se domain for 0.3btc
List of domain names can be found here http://www.wn.se/t1048935.html
The buyer pays for eventual transfer fees.
16  Economy / Goods / [SELLING] STEAM GAME: Hoard on: July 13, 2011, 07:02:38 PM
Selling one Hoard for 0.5BTC
http://store.steampowered.com/app/63000/
17  Economy / Currency exchange / [Sweden] Buying 5BTC on: July 10, 2011, 08:38:45 PM
Only swedish.

Köper 5BTC för 375 Kr i skrivande stund.
18  Economy / Goods / [WTB] STEAM Games on: July 10, 2011, 07:58:06 PM
Dreamfall: The longest Journey - 0.25BTC
Garshasp: The Monster Slayer - 0.1BTC
Guardians of Graxia - 0.1BTC
Hydrophobia: Prophecy - 0.15BTC
The Witcher: Enhanced Edition - 0.5BTC <- want most

or 1.2BTC for all.
19  Bitcoin / Bitcoin Technical Support / Key pool? on: July 05, 2011, 10:29:56 PM
What is key pool? I do not understand this. https://en.bitcoin.it/wiki/Key_pool Could someone explain? Do it affect number of addresses you can have in wallet?
20  Bitcoin / Bitcoin Technical Support / New receiving address for every payment? on: July 05, 2011, 05:53:54 PM
Why do I get a new receiving address in address book everytime I send a payment?
Pages: [1] 2 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!