bitcoinfuck (OP)
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 634
Merit: 106
Europe Belongs To Christians
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 23, 2018, 04:43:01 PM |
|
hey i want to try a new approach to my project
What i want to do ? Send BTC from private key to a address
USING PHP or any simple small script
Electrum like solution to send
|
|
|
|
Initscri
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 24, 2018, 03:31:49 AM Last edit: December 24, 2018, 01:31:16 PM by Initscri Merited by OmegaStarScream (3), LoyceV (1) |
|
If you want to use PHP, you're either going to have to run a Bitcoind server, or leverage an existing API (for example, Blockchain.info's) BitcoindUsing PHP-bitcoinrpc class ( https://github.com/denpamusic/php-bitcoinrpc) <?php $bitcoind = new BitcoinClient('http://rpcuser:rpcpassword@localhost:8332/');
//add the private key (label, key) $import = bitcoind->importprivkey("SOME_PRIVATE_KEY");
$result = $bitcoind->sendToAddress('YOUR_ADDRESS', 0.1); // 0.1=amount $txid = $result->get(); ?>
Note: I haven't tested this code, so please testUsing an API (Blockchain.com)<?php
$Blockchain = new \Blockchain\Blockchain($api_code); $Blockchain->setServiceUrl("http://localhost:3000"); // Set to service URL (for example: https://blockchain.info/merchant/$guid/) $wallet = $Blockchain->Create->createWithKey($password, $privKey, $email=null, $label=null);
// Example: Send 0.005 BTC to YOUR_ADDRESS (replace), with a 0.0001 BTC fee $response = $wallet->send("YOUR_ADDRESS", "0.005", null, "0.0001");
|
---------------------------------- Web Developer. PM for details. ----------------------------------
|
|
|
bitcoinfuck (OP)
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 634
Merit: 106
Europe Belongs To Christians
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 24, 2018, 12:04:11 PM |
|
If you want to use PHP, you're either going to have to run a Bitcoind server, or leverage an existing API (for example, Blockchain.info's) BitcoindUsing PHP-bitcoinrpc class ( https://github.com/denpamusic/php-bitcoinrpc) <?php $bitcoind = new BitcoinClient('http://rpcuser:rpcpassword@localhost:8332/');
//add the private key (label, key) $import = bitcoind->importprivkey("SOME_PRIVATE_KEY");
$result = $bitcoind->sendToAddress('YOUR_ADDRESS', 0.1); // 0.1=amount $txid = $result->get(); ?>
Note: I haven't tested this code, so please testUsing an API (Blockchain.com)<?php
$Blockchain = new \Blockchain\Blockchain($api_code); $Blockchain->setServiceUrl("http://localhost:3000"); // Set to service URL (for example: https://blockchain.info/merchant/$guid/) $wallet = $Blockchain->Create->createWithKey($password, $privKey, $email=null, $label=null);
// Example: Send 0.005 BTC to YOUR_ADDRESS (replace), with a 0.0001 BTC fee $response = $wallet->send("YOUR_ADDRESS", "0.005", null, "0.0001");
p.s: you should probably move this to development & technical ( https://bitcointalk.org/index.php?board=6.0), you'd get more programming related responses/assistance there. thanks for reply, but Blockchain.com api is not good small Payout as they take 0.001 from every payout
|
|
|
|
Initscri
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 24, 2018, 12:11:25 PM |
|
If you want to use PHP, you're either going to have to run a Bitcoind server, or leverage an existing API (for example, Blockchain.info's) BitcoindUsing PHP-bitcoinrpc class ( https://github.com/denpamusic/php-bitcoinrpc) <?php $bitcoind = new BitcoinClient('http://rpcuser:rpcpassword@localhost:8332/');
//add the private key (label, key) $import = bitcoind->importprivkey("SOME_PRIVATE_KEY");
$result = $bitcoind->sendToAddress('YOUR_ADDRESS', 0.1); // 0.1=amount $txid = $result->get(); ?>
Note: I haven't tested this code, so please testUsing an API (Blockchain.com)<?php
$Blockchain = new \Blockchain\Blockchain($api_code); $Blockchain->setServiceUrl("http://localhost:3000"); // Set to service URL (for example: https://blockchain.info/merchant/$guid/) $wallet = $Blockchain->Create->createWithKey($password, $privKey, $email=null, $label=null);
// Example: Send 0.005 BTC to YOUR_ADDRESS (replace), with a 0.0001 BTC fee $response = $wallet->send("YOUR_ADDRESS", "0.005", null, "0.0001");
p.s: you should probably move this to development & technical ( https://bitcointalk.org/index.php?board=6.0), you'd get more programming related responses/assistance there. thanks for reply, but Blockchain.com api is not good small Payout as they take 0.001 from every payout You can change the fee by switching the last parameter in $wallet->send. That was just for an example.
|
---------------------------------- Web Developer. PM for details. ----------------------------------
|
|
|
darosior
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 24, 2018, 12:16:54 PM |
|
Send BTC from private key to a address You don't have to use only RPC, you can also make transactions and send them to the network thanks to a library .
|
|
|
|
LoyceV
Legendary
Offline
Activity: 3430
Merit: 17327
Thick-Skinned Gang Leader and Golden Feather 2021
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 24, 2018, 01:29:17 PM |
|
simple small script
Electrum like solution to send I haven't tested it, but have you lookd at Electrum command line options? I was amazed with this feature a while ago. It may be worth checking if it can do what you need.
|
|
|
|
bitcoinfuck (OP)
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 634
Merit: 106
Europe Belongs To Christians
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 25, 2018, 01:49:33 PM |
|
Send BTC from private key to a address You don't have to use only RPC, you can also make transactions and send them to the network thanks to a library . can you link me to a single webapge, its full search and none of them offer solution i am trying to get
|
|
|
|
bitcoinfuck (OP)
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 634
Merit: 106
Europe Belongs To Christians
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 25, 2018, 01:51:13 PM |
|
If you want to use PHP, you're either going to have to run a Bitcoind server, or leverage an existing API (for example, Blockchain.info's) BitcoindUsing PHP-bitcoinrpc class ( https://github.com/denpamusic/php-bitcoinrpc) <?php $bitcoind = new BitcoinClient('http://rpcuser:rpcpassword@localhost:8332/');
//add the private key (label, key) $import = bitcoind->importprivkey("SOME_PRIVATE_KEY");
$result = $bitcoind->sendToAddress('YOUR_ADDRESS', 0.1); // 0.1=amount $txid = $result->get(); ?>
Note: I haven't tested this code, so please testUsing an API (Blockchain.com)<?php
$Blockchain = new \Blockchain\Blockchain($api_code); $Blockchain->setServiceUrl("http://localhost:3000"); // Set to service URL (for example: https://blockchain.info/merchant/$guid/) $wallet = $Blockchain->Create->createWithKey($password, $privKey, $email=null, $label=null);
// Example: Send 0.005 BTC to YOUR_ADDRESS (replace), with a 0.0001 BTC fee $response = $wallet->send("YOUR_ADDRESS", "0.005", null, "0.0001");
p.s: you should probably move this to development & technical ( https://bitcointalk.org/index.php?board=6.0), you'd get more programming related responses/assistance there. thanks for reply, but Blockchain.com api is not good small Payout as they take 0.001 from every payout You can change the fee by switching the last parameter in $wallet->send. That was just for an example. this is what i am trying to say https://www.blockchain.com/api/blockchain_wallet_api
|
|
|
|
darosior
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 25, 2018, 07:58:55 PM |
|
can you link me to a single webapge, its full search and none of them offer solution i am trying to get You could search by yourself instead of asking and waiting for the ready answer, it was just an example. However, the first result of the search points to a PHP Bitcoin library providing a transaction builder.
|
|
|
|
Initscri
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 26, 2018, 03:26:26 AM |
|
Ah ok, I see, I missed that. If you're not up for RPC, you can use PHP along with LoyveV's reco. Or, you can try another API
|
---------------------------------- Web Developer. PM for details. ----------------------------------
|
|
|
bitcoinfuck (OP)
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 634
Merit: 106
Europe Belongs To Christians
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 26, 2018, 06:04:45 AM |
|
can you link me to a single webapge, its full search and none of them offer solution i am trying to get You could search by yourself instead of asking and waiting for the ready answer, it was just an example. However, the first result of the search points to a PHP Bitcoin library providing a transaction builder. i practicly looked to all repo, none of them seems to work as i intended + who told i am waiting here ? i am already working on project why would i keep my hopes on you guys, i am just here for suggestion.
|
|
|
|
|
bitcoinfuck (OP)
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 634
Merit: 106
Europe Belongs To Christians
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 27, 2018, 07:54:19 AM |
|
block io api is known for cold techniques stealing and manipluating funds, i would advise everyone to be carefull
|
|
|
|
Initscri
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 28, 2018, 01:22:05 AM |
|
block io api is known for cold techniques stealing and manipluating funds, i would advise everyone to be carefull Do you have links/references for this? I'd like to take a look. Cheers,
|
---------------------------------- Web Developer. PM for details. ----------------------------------
|
|
|
bitcoinfuck (OP)
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 634
Merit: 106
Europe Belongs To Christians
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 28, 2018, 04:18:26 PM |
|
for anyone looking for updates to this thread the best i found for general public is dev.btc.com
it has fees adjustments, fast and realiable
|
|
|
|
|