How can I send bitcoins in my web app without running the daemon on my server? Is there a way to do it? Do third parties allow you to send through them?
Yes this is completely possible. There are services which run fully featured API's that provide almost everything that the client can do.
There are other merchant processors which have similar functionality depending on exactly what you want to do also.
If you could somehow track the outputs at your disposal (which you may therefor send in an outgoing transaction you could in fact create a transaction, sign it and submit it to a bitcoind daemon or blockchain.info (via the
sendrawtransaction API call) to get it into the network.
Tracking outputs is the sole reason you likely have to run a daemon. Even if you create a single output for 100 BTC and then start creating transactions from that output, by splitting off small amounts and send the change back, it makes the transactions dependent on each other. As soon as a single transaction is not validated (due to a bug, incomplete fees or a double spend), all following transactions will also fail.
Spending bitcoins without being connected to the network overlay is possible, but at some point you'll have to synchronize with the network to ensure the transactions have been accepted and to get fill up the output pool for future spends.
To send bitcoins you need:
- Private key(s) for the address(es) being spent
- Transaction hash + index for each transaction previously received to those addresses whose funds will be used for spending in this transaction
- Bitcoin address(es) to send to, including change address if there will be change.
The Bitcoin.org client does all this elegantly without the user needing to know anything except what address(es) to pay and the amount. To construct a transaction manually means obtaining data from the blockchain, performing a cryptographic signature using the private key, and broadcasting that transaction to peer nodes.
The Raw Transactions API article on the Bitcoin.it Wiki describes this further.
Now if you simply need to send from a node that is not on a live connection (but has a current blockchain), you can do this using the Armory client:
Also the Electrum client apparently can be used to provide to you the raw transaction that could then be broadcast to spend a coin. Electrum uses a back-end server that does all the work that the Bitcoin.org client would do in building the transaction.
Once you have a raw transaction to broadcast, you can use the PushTx API on blockchain.info or BrainWallet.org will let you [broadcast a transaction] as well.