Bitcoin Forum
September 03, 2024, 07:24:50 AM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to send BTC from a web server/website  (Read 521 times)
goobernoober (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
December 14, 2013, 04:52:26 AM
 #1

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.

CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1086


Ian Knowles - CIYAM Lead Developer


View Profile WWW
December 14, 2013, 05:46:41 AM
 #2

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.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
goobernoober (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
December 14, 2013, 06:53:32 AM
 #3

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] Smiley

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. 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?
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1086


Ian Knowles - CIYAM Lead Developer


View Profile WWW
December 14, 2013, 07:00:42 AM
Last edit: December 14, 2013, 07:17:39 AM by CIYAM Open
 #4

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.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
emilyatk
Newbie
*
Offline Offline

Activity: 23
Merit: 0


View Profile
December 14, 2013, 07:12:00 AM
 #5

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.
goobernoober (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
December 14, 2013, 07:32:25 AM
 #6

you need to know how to code PHP.
Okay. I've done that. Then what?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!