I'm learning how to use bitcoind, and want to set up a side project that uses bitcoin to learn along the way. I'll be using the json-rpc with PHP on my server. I want to create a service that will receive bitcoins from users, and will eventually send those bitcoins either back to the users or to my own wallet.
In order to keep things secure, as soon as coins arrive at a user's unique address, I want to automatically forward them to another wallet that doesn't have the private keys on the server.
My questions are thus:
What's the easiest way to handle the bitcoins from an off-server wallet (on my computer or such), without doing absolutely everything by hand? Would it be possible to write a script that does everything I want it to do with the off-server coins, after prompting me for the private keys? For example, a database could hold all the bitcoin commands that would need to be run, but it would need by "OK" to run (requiring the keys). Would the keys be somehow visible if someone got access to the server?
If not the above method, how else can I automate the process as much as possible? The only thing I can think of currently is to do everything by hand: have a private wallet on my home computer, seeing what to do with bitcoins on various addresses, and manually sending them out using my home bitcoin client to the required addresses. This would be extremely tedious with a lot of users on the service. Surely there's a better, secure way?
I don't want to keep private keys on the server for two reasons: a) I don't know anything about server administrations or server security, as I'm just a developer, and b) as a result, I have a managed server (managed by the host), so they could get into the server at any time. I'm wondering, can anyone suggest how to get started in server administration and security so that I can take it into my own hands?
EDIT: To clarify, I mean handling transactions that are off of the server, not actually in "cold storage." The off-server wallet could be hosted on my personal computer--I just don't want it on the server, since it's more prone to attack.