jak3 (OP)
Legendary
Offline
Activity: 1274
Merit: 1004
|
|
May 17, 2016, 04:18:32 AM |
|
as the tital says i want to fetch balance from an bitcoin address and want to show it into my wapsite. any help will be appricialted but no spamming please and i have seen aome short of bitcoin api thing like blockchain api but i didnt exactly get it that how to implement them so if someone know then better how it with php or just tell how to implement it thank you for giving your time
|
|
|
|
jak3 (OP)
Legendary
Offline
Activity: 1274
Merit: 1004
|
|
May 19, 2016, 04:24:12 AM |
|
hello its 24hr passed and nobody replyed to my thread please someone tell me how can i fetch the balance of a bitcoin address and show it on a web page please tell me i amreally in need of this
|
|
|
|
|
jak3 (OP)
Legendary
Offline
Activity: 1274
Merit: 1004
|
|
May 19, 2016, 08:35:45 AM |
|
hello thank uou for your feedback i checked the site,made the account and get the api but i didnt get it exavtly how to setup it on my site using php can you supply me an example code.i have downloaded the block-io.php
|
|
|
|
jambola2
Legendary
Offline
Activity: 1120
Merit: 1038
|
|
May 19, 2016, 12:32:42 PM |
|
If you want a simpler API, try the Blockchain.info APISimply query " https://blockchain.info/q/addressbalance/ADDRESS" to get the balance in satoshis in plaintext. Unlike block.io, it doesn't require any installs or auth keys.
|
No longer active on bitcointalk, however, you can still reach me via PMs if needed.
|
|
|
wintermeasures
|
|
May 19, 2016, 01:52:07 PM |
|
as the tital says i want to fetch balance from an bitcoin address and want to show it into my wapsite. any help will be appricialted but no spamming please and i have seen aome short of bitcoin api thing like blockchain api but i didnt exactly get it that how to implement them so if someone know then better how it with php or just tell how to implement it thank you for giving your time
i think someone in this section https://bitcointalk.org/index.php?topic=2881.0 have some problem like you. maybe u can get "how" in that thread. thanks
|
|
|
|
chrisvl
Legendary
Offline
Activity: 1274
Merit: 1006
Trainman
|
|
May 19, 2016, 02:17:22 PM Last edit: May 19, 2016, 02:33:13 PM by chrisvl |
|
This returns your balance in satoshis <?php function getBalance($address) { return file_get_contents('https://blockchain.info/de/q/addressbalance/'. $address); }
echo 'Address Balance: ' . getBalance('1EzwoHtiXB4iFwedPr49iywjZn2nnekhoj'); and this your balance in btc <?php function getBalance($address) { return file_get_contents('https://blockchain.info/de/q/addressbalance/'. $address); }
$insatoshi = getBalance('1EzwoHtiXB4iFwedPr49iywjZn2nnekhoj'); $intbtc = $insatoshi / 100000000; echo 'Address Balance: ' . $intbtc;
|
|
|
|
esotericizm
|
|
May 19, 2016, 10:00:04 PM |
|
if using jquery you could also do var addr = "15urYnyeJe3gwbGJ74wcX89Tz7ZtsFDVew"; $.getJSON('https://insight.bitpay.com/api/addr/' + addr + '/balance', function(balance){ $('#balance').html(balance / 100000000); });
|
|
|
|
fbueller
|
|
May 20, 2016, 11:24:13 AM |
|
Insight servers are open, but you need to find them. Simple curl requests will do. Stratum servers (they power electrum) do the same, but you can find a list of them using IRC. Stratum offers SPV proofs for a transaction, so you can prove it was in the blockchain and they're not feeding you lies. I wrote a PHP library for working with stratum servers. https://github.com/Bit-Wasp/stratum-phpIt might be worth writing a library in JS to talk to stratum servers, I haven't seen one yet. Edit: Avoid using the BC.I API. They've had extraordinary number of problems. Just use something that talks to a full node.
|
Bitwasp Developer.
|
|
|
jak3 (OP)
Legendary
Offline
Activity: 1274
Merit: 1004
|
|
May 20, 2016, 02:26:16 PM |
|
This returns your balance in satoshis <?php function getBalance($address) { return file_get_contents('https://blockchain.info/de/q/addressbalance/'. $address); }
echo 'Address Balance: ' . getBalance('1EzwoHtiXB4iFwedPr49iywjZn2nnekhoj'); and this your balance in btc <?php function getBalance($address) { return file_get_contents('https://blockchain.info/de/q/addressbalance/'. $address); }
$insatoshi = getBalance('1EzwoHtiXB4iFwedPr49iywjZn2nnekhoj'); $intbtc = $insatoshi / 100000000; echo 'Address Balance: ' . $intbtc; Parse error : syntax error, unexpected 'Â ' (T_STRING) in /home/vhosts/host/bal.php on line 3 i think the code is somewhere throwing the error
|
|
|
|
bitcoineverything
|
|
May 20, 2016, 02:32:17 PM |
|
You can use a blockchain explorer. You can look for them online. This is useful if you dont have your bitcoin wallet at hand. All bitcoin addresses are visible publicly in the blockchain. All you need to have is the bitcoin address or the transaction id.
|
We are here to give you all the latest from the Cryptocurrency space!
|
|
|
chrisvl
Legendary
Offline
Activity: 1274
Merit: 1006
Trainman
|
|
May 20, 2016, 02:52:12 PM |
|
This returns your balance in satoshis <?php function getBalance($address) { return file_get_contents('https://blockchain.info/de/q/addressbalance/'. $address); }
echo 'Address Balance: ' . getBalance('1EzwoHtiXB4iFwedPr49iywjZn2nnekhoj'); and this your balance in btc <?php function getBalance($address) { return file_get_contents('https://blockchain.info/de/q/addressbalance/'. $address); }
$insatoshi = getBalance('1EzwoHtiXB4iFwedPr49iywjZn2nnekhoj'); $intbtc = $insatoshi / 100000000; echo 'Address Balance: ' . $intbtc; Parse error : syntax error, unexpected 'Â ' (T_STRING) in /home/vhosts/host/bal.php on line 3 i think the code is somewhere throwing the error its working for me,Delete all the white space characters in line 3
|
|
|
|
bob123
Legendary
Offline
Activity: 1624
Merit: 2481
|
|
May 22, 2016, 04:55:18 PM |
|
The mentioned code snippet is definetly working
|
|
|
|
TheBarMan
Full Member
Offline
Activity: 140
Merit: 100
DEGEN Future Traders
|
|
June 09, 2016, 07:25:57 PM |
|
The mentioned code snippet is definetly working
Hello, thanks for this info, is very important to me... any one can tell me how can i add this comment to some kind of "markers" in this forum for further read???
|
|
|
|
ebliever
Legendary
Offline
Activity: 1708
Merit: 1036
|
|
June 09, 2016, 07:39:58 PM |
|
The mentioned code snippet is definetly working
Hello, thanks for this info, is very important to me... any one can tell me how can i add this comment to some kind of "markers" in this forum for further read??? Click "Watch" at the bottom of the thread.
|
Luke 12:15-21
Ephesians 2:8-9
|
|
|
jaydipmodhwadia
|
|
June 09, 2016, 07:44:19 PM |
|
This returns your balance in satoshis <?php function getBalance($address) { return file_get_contents('https://blockchain.info/de/q/addressbalance/'. $address); }
echo 'Address Balance: ' . getBalance('1EzwoHtiXB4iFwedPr49iywjZn2nnekhoj'); and this your balance in btc <?php function getBalance($address) { return file_get_contents('https://blockchain.info/de/q/addressbalance/'. $address); }
$insatoshi = getBalance('1EzwoHtiXB4iFwedPr49iywjZn2nnekhoj'); $intbtc = $insatoshi / 100000000; echo 'Address Balance: ' . $intbtc; Parse error : syntax error, unexpected 'Â ' (T_STRING) in /home/vhosts/host/bal.php on line 3 i think the code is somewhere throwing the error its working for me,Delete all the white space characters in line 3 Works perfectly, however, wouldn't you still need the key for the blockchain api or am I wrong?
|
|
|
|
chrisvl
Legendary
Offline
Activity: 1274
Merit: 1006
Trainman
|
|
June 09, 2016, 08:23:47 PM |
|
This returns your balance in satoshis <?php function getBalance($address) { return file_get_contents('https://blockchain.info/de/q/addressbalance/'. $address); }
echo 'Address Balance: ' . getBalance('1EzwoHtiXB4iFwedPr49iywjZn2nnekhoj'); and this your balance in btc <?php function getBalance($address) { return file_get_contents('https://blockchain.info/de/q/addressbalance/'. $address); }
$insatoshi = getBalance('1EzwoHtiXB4iFwedPr49iywjZn2nnekhoj'); $intbtc = $insatoshi / 100000000; echo 'Address Balance: ' . $intbtc; Parse error : syntax error, unexpected 'Â ' (T_STRING) in /home/vhosts/host/bal.php on line 3 i think the code is somewhere throwing the error its working for me,Delete all the white space characters in line 3 Works perfectly, however, wouldn't you still need the key for the blockchain api or am I wrong? not for the particular function does not need any key
|
|
|
|
Sir_lagsalot
|
|
June 09, 2016, 09:21:09 PM |
|
Hahaha. You guys. There's an easier way. (A much easier way) If you don't care about the low quality. Just try it out! It's on the bottom of btc-priceimg.herokuapp.comThis is an example. Click "Quote" to view the code.
|
|
|
|
|