Bitcoin Forum
February 28, 2017, 08:06:59 AM *
News: Latest stable version of Bitcoin Core: 0.13.2  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Scritp to auto send bitcoins to person  (Read 4050 times)
french
Newbie
*
Offline Offline

Activity: 17



View Profile
May 23, 2011, 10:50:50 PM
 #1

Hello, I am creating a site along the lines of bitcoin faucet but a little different.  I am wondering if there is a open source script or how I can go about of making it so that when someone clicks "submit" or "withraw" it automatically sends them lets say 1BTC.

Thanks for any help  Cheesy
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
bittrader
Jr. Member
*
Offline Offline

Activity: 42



View Profile
May 23, 2011, 11:37:51 PM
 #2

What language do you want it in?
bittrader
Jr. Member
*
Offline Offline

Activity: 42



View Profile
May 23, 2011, 11:42:54 PM
 #3

Someone posted a very simple PHP library for talking to the bitcoind server: http://forum.bitcoin.org/index.php?topic=9304.0

That would allow you to send bitcoins to someone by doing something like

Code:
include_once("Bitcoin.php");

$rpcUser = "username";
$rpcPass = "password";
$url = "http://localhost:8332";
$address = "whatever";
$amount = 5;

$bitcoin = new Bitcoin($url, $rpcUser, $rpcPass);

$bitcoin->sendToAddress($address, $amount);

(Untested code)

You would have to be running bitcoind on the same server as the web server.
Sawzall
Full Member
***
Offline Offline

Activity: 140



View Profile
May 25, 2011, 01:31:26 AM
 #4

If you want something more specific done, I've done a reasonable amount of PHP and I work cheap.
sentry
Newbie
*
Offline Offline

Activity: 27


View Profile WWW
May 25, 2011, 01:48:50 AM
 #5

This is how to do it without the library, though you will need the JSON RPC Client, found here: http://jsonrpcphp.org/?page=download&lang=en

Code:
<?php
require_once "classes/jsonRPCClient.php";

define ("BC_HOST""127.0.0.1"); // set bc client addy
define ("BC_USER""user"); // set rpc user
define ("BC_PASS""pass"); // set rpc password
define ("BC_PORT""8332"); // set rpc port

$bitcoin = new jsonRPCClient("http://".BC_USER.":".BC_PASS."@".BC_HOST.":".BC_PORT);
?>


Then you have a list of functions you can do with their parameters here: https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list

For example for what you want to do:

Code:
<?php
$bitcoin
->sendtoaddress(<bitcoinaddress>, <amount>);
?>

Make sure the amount is not a string or you will get errors. Remember you can use the commands from that website in place of "sendtoaddress" to fit your needs.

Donations @ http://www.bitcoinplus.com/generate?for=533592
You don't have to give anything, just your idle time if you like what I'm doing.

Use Bitcoin7 (https://www.bitcoin7.com/?ref=8986)!
darbsllim
Sr. Member
****
Offline Offline

Activity: 301


Founder, Filmmaker, Fun Guy


View Profile
May 25, 2011, 08:56:36 AM
 #6

Sawzall, can you send some of your work examples?

Brad

Brad Mills
Algorithmic Trader - Former miner - Former Bitcoin Business Owner - Victim of the Great Bitcoin Crashes of 2011 and 2012, and the MtGox Heist of 2014
tennis
Sr. Member
****
Offline Offline

Activity: 339


View Profile
February 22, 2014, 12:43:08 AM
 #7

Can anyone please help me set something lke this up?  I'm looking for a sort of "investment" tool as you will that automatically sends myself bitcoins every week, month, heck every year.  How can I find a faucet of sorts that auto-pays myself into another btc wallet from the faucet wallet over specified automated send times. 

How hard would this be to set up?
fuzzbuzz
Jr. Member
*
Offline Offline

Activity: 42

Open Source Projects


View Profile WWW
July 07, 2014, 06:01:45 AM
 #8

This feature of

Auto-Forward/Send coins from Address A to Address B  automatically on intervals for payment systems

It should be built within the Wallet.

Just select the two addresses, the fee, desired amount , duration, and frequency of payment. Done

Any coins with this feature within the wallet already?

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!