<p>You should not store your private keys on a webserver, unless you actually need to spend the bitcoins from that very same server.</p>

<p>Remember, to receive money on an address, check its balance, etc, you only need the address. This is much safer because that way nobody could steal your money, even if they get full access to your server.</p>

<p>One way to do it is to import all private keys in a new, separate wallet (default Bitcoin Core install would do), password-protect the wallet with a long, random, gibberish password and then discard the password (of course make sure you also still have the private keys in the original wallet). This essentially creates a "read only" wallet, which would be safe to put on your webserver, and allows for all functionality on your addresses, except spending the money. </p>

<p>To actually spend the money, you use the original wallet that doesn't need to be on your webserver.</p>

CC BY-SA 3.0
2014-10-14T22:58:51.317Z
2014-10-14T22:58:51.317Z
Maǳi Koǌo
<p>I am setting up my site on a hosting (not a server, just a hosting) where i will accept payments of bitcoins and maybe other cryptos later, after a week or so, i want to "sweep" my wallets.</p>

<p>In short:</p>

<p>I have a list with privatekeys and minikeys. That's all.
I want to know if possibly, without quering API (html dom of blockchain.info/q/ would be better) which wallet has balance <strong>>0</strong> and saves that key into another file.</p>

<p>So is there any way to check balances without importing? I mean, converting private keys to wallet adress?</p>

<p>Or maybe there is any way to create a wallet with PHP where i can create a wallet, get it's wallet adress and private key.</p>

<p>I don't want to use API, since some apis has limited querries per hour, and if i want to check them all hourly / daily it may hit the limit.</p>

<p>Thanks for help!</p>

<wallet><private-key>
PHP Checking privatekeys
Ufonautas
# PHP Checking privatekeys

(Asked by: username_0 on 2014-10-13)

I am setting up my site on a hosting (not a server, just a hosting) where i will accept payments of bitcoins and maybe other cryptos later, after a week or so, i want to "sweep" my wallets.

In short:

I have a list with privatekeys and minikeys. That's all.
I want to know if possibly, without quering API (html dom of blockchain.info/q/ would be better) which wallet has balance **>0** and saves that key into another file.

So is there any way to check balances without importing? I mean, converting private keys to wallet adress?

Or maybe there is any way to create a wallet with PHP where i can create a wallet, get it's wallet adress and private key.

I don't want to use API, since some apis has limited querries per hour, and if i want to check them all hourly / daily it may hit the limit.

Thanks for help!

**Tags:** wallet, private-key


---

## 1 answers

### Answer by username_1 on 2014-10-14. Score: 1

You should not store your private keys on a webserver, unless you actually need to spend the bitcoins from that very same server.

Remember, to receive money on an address, check its balance, etc, you only need the address. This is much safer because that way nobody could steal your money, even if they get full access to your server.

One way to do it is to import all private keys in a new, separate wallet (default Bitcoin Core install would do), password-protect the wallet with a long, random, gibberish password and then discard the password (of course make sure you also still have the private keys in the original wallet). This essentially creates a "read only" wallet, which would be safe to put on your webserver, and allows for all functionality on your addresses, except spending the money.

To actually spend the money, you use the original wallet that doesn't need to be on your webserver.


---

