Post
Topic
Board Beginners & Help
Re: PHP Wallet
by
coder_guy
on 15/12/2012, 19:09:23 UTC
Can somebody please explain bitaddress.org? I see it generates addresses. Couldn't I just use their source to allow my webhost (heck, even a free one!) to generate an address whenever a user signs up, and save in a DB somewhere that bitcoin address and the private key? Then when I want to spend bitcoins, I just import the private keys into my local machine and POOF, tons of coins?

And also, one more thing, how do I import the private key into my wallet? Do I just copy it into wallets.dat? (My wallets.dat file is encrypted, so I doubt that would work).

Thanks!

there is a
Code:
importprivkey [label]
command

remember to unlock your wallet first

Wow! Great!

Then this just became a lot easier.

Run with me to get the process straight.

Step 1: Implement some form of this (https://github.com/pointbiz/bitaddress.org) on my webserver. Not sure how (I'll get to that part later Cheesy)
Step 2: Make a function generateaddress() that creates a bitcoin address and a private key.
Step 3: Assign each user that signs up an individual address.
Step 4: Wait for payments to come
Step 5: Whenever I feel like it, I log onto my webhost, download all the private keys, and import them all using importprivkey. Probably delete them from the webhost after I do this.

Sounds good. The only part that sounds potentially deadly is turning https://github.com/pointbiz/bitaddress.org into a php function that generates an address and stores the private key. But at least that sounds dooable!