Learning Diary, how to generate bitcoin address in your website,学习笔记,网站generate bitcoin地址

in #php7 years ago (edited)

Screen Shot 2018-03-11 at 9.25.58 PM.png

Hello Steemit friends today I need to generate bitcoin address from my website so I google a lot but most of the GitHub code are unable to use because I am using share hosting and most stuff unable to install. After searching for quite some times, i stumbled upon a Github code that require no installation

https://github.com/zamgo/PHPCoinAddress

all you need to do is to download the source code and put inside one of the folder, then create a new php file and put in below code

<?php
 
 require_once ("PHPCoinAddress.php");
 $coin = CoinAddress::bitcoin();
 $public = $coin['public'];
 $private = $coin['private'];
 echo "<br>public is: ".$public;
 echo "<br>private is: ".$private;

?>

This will return you a brand new bitcoin public and private key, too bad those address are not segwit, because if you use segwit address you can save back a lot of transaction fee

thanks for reading


今天网站需要随机创造一个bitcoin地址,很多github的代码都用不到,因为我用share hosting,好多东西都不可以install,后来找了很久,找到一个不用install任何东西的代码

https://github.com/zamgo/PHPCoinAddress

主要把里面的代码放入其中一个folder,然后随便开一个.php file 放入


<?php
 
require_once ("PHPCoinAddress.php");
$coin = CoinAddress::bitcoin();
$public = $coin['public'];
$private = $coin['private'];
echo "<br>public is: ".$public;
echo "<br>private is: ".$private;

?>

大功告成,不过可惜不是segwit地址,现在不用segwit地址需要亏好多交易费呢

谢谢阅读

Sort:  

Boost Your Post. Send 0.100 STEEM or SBD and your post url on memo and we will resteem your post on 5000+ followers. ( Also if you send 0.300 SBD or steem you will be restmmed over 15000+ followers - additional resteem from thous accounts funaddaa and gordonramsay ) check our account to see the follower count.

Thank you so much for the useful information, sir. Lots of love.

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63398.53
ETH 2660.51
USDT 1.00
SBD 2.77