Author

Topic: Scritp to auto send bitcoins to person (Read 4862 times)

newbie
Activity: 42
Merit: 0
July 07, 2014, 01: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?
sr. member
Activity: 343
Merit: 250
February 21, 2014, 07:43:08 PM
#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?
sr. member
Activity: 297
Merit: 251
Founder, Filmmaker, Fun Guy
Sawzall, can you send some of your work examples?

Brad
newbie
Activity: 88
Merit: 0
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:
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:
$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.
full member
Activity: 140
Merit: 100
If you want something more specific done, I've done a reasonable amount of PHP and I work cheap.
jr. member
Activity: 42
Merit: 1
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.
jr. member
Activity: 42
Merit: 1
What language do you want it in?
newbie
Activity: 20
Merit: 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
Jump to: