Title: How to send BTC from a web server/website Post by: goobernoober on December 14, 2013, 04:52:26 AM I'm looking at creating a simple website for my own testing/messing around with and one of the functions of it is to send BTC based on a webform input. All I want to know is how do I send an amount of bitcoin to a wallet address. The BTC will be coming from a wallet on the web server(?). I'm after the code (or sample code, or a push in the right direction) to 'create' a bitcoin transaction and publish it to the bitcoin network. Would it be PHP, Java, Ruby etc?
I've had a look through the bitcoin.it wiki and it seems really complex. I'm not 100% sure if it just has to be like that, or if I'm looking at the wrong info. Thanks for any information. Title: Re: How to send BTC from a web server/website Post by: CIYAM on December 14, 2013, 05:46:41 AM You might want to carefully consider what you are trying to do.
Putting a wallet on a server can be a very risky idea - and especially so if that server isn't under your physical control. Title: Re: How to send BTC from a web server/website Post by: goobernoober on December 14, 2013, 06:53:32 AM Understood.
Like I said before, I'm doing this for my own messing around (kind of like "ha, i made that and it works"). I can run it all locally with an Apache localhost, so that'll keep me safe[r] :) Just to elaborate a bit in case it wasn't clear in my OP, take for example the withdraw page on Ice Dice: https://ice-dice.com/en/account/withdraw (https://ice-dice.com/en/account/withdraw). When you fill in the text fields and click "Withdraw", obviously some function (code) is called and executed on their server(s). How do they do that/what is the [example] code? Title: Re: How to send BTC from a web server/website Post by: CIYAM on December 14, 2013, 07:00:42 AM Am not a PHP user myself but basically you want to use "bitcoind" via the RPC interface to do your operations in PHP.
The API reference is here: https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29 (scroll down for a PHP example). For Java you would probably want to instead be using "bitcoinj" although I wouldn't recommend either it or Ruby for a bitcoin "hot wallet" as both have had plenty of exploits that could easily lead to your wallet being drained. Title: Re: How to send BTC from a web server/website Post by: emilyatk on December 14, 2013, 07:12:00 AM I'm looking at creating a simple website for my own testing/messing around with and one of the functions of it is to send BTC based on a webform input. All I want to know is how do I send an amount of bitcoin to a wallet address. The BTC will be coming from a wallet on the web server(?). I'm after the code (or sample code, or a push in the right direction) to 'create' a bitcoin transaction and publish it to the bitcoin network. Would it be PHP, Java, Ruby etc? I've had a look through the bitcoin.it wiki and it seems really complex. I'm not 100% sure if it just has to be like that, or if I'm looking at the wrong info. Thanks for any information. you need to know how to code PHP. Title: Re: How to send BTC from a web server/website Post by: goobernoober on December 14, 2013, 07:32:25 AM you need to know how to code PHP. Okay. I've done that. Then what? |