Created
April 5, 2018 00:56
-
-
Save layoutph/804a395112b20a96df6c986660502246 to your computer and use it in GitHub Desktop.
Fetch BTC balance from BTC address using PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getBalance($address) { | |
return file_get_contents('https://blockchain.info/de/q/addressbalance/'. $address); | |
} | |
$theb = getBalance('1EzwoHtiXB4iFwedPr49iywjZn2nnekhoj'); | |
$theb = $theb / 100000000; | |
echo 'Address Balance: ' . $theb; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment