Bitcoin Forum
June 30, 2024, 12:00:57 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Simple script that will display balance on a website  (Read 2320 times)
BTC_1 (OP)
Full Member
***
Offline Offline

Activity: 148
Merit: 100



View Profile
December 13, 2015, 05:18:24 PM
 #1

Hi everyone a little help required  Smiley

I want to include in my website the balance of one of my BTC wallets

The wallet is local and running on my linux box as is the website, I dont want to use blockchain.info or similar I want to connect to my wallet direct using my rpc username and password and i guess use the getinfo command to display the results on my website.

I have been looking at some open source projects for tips and code that perhaps I could adjust and use but I have to be honest and say im finding it hard.

Thanks for any help offered !

funkydog
Full Member
***
Offline Offline

Activity: 140
Merit: 100



View Profile
December 13, 2015, 05:36:56 PM
 #2

Hi everyone a little help required  Smiley

I want to include in my website the balance of one of my BTC wallets

The wallet is local and running on my linux box as is the website, I dont want to use blockchain.info or similar I want to connect to my wallet direct using my rpc username and password and i guess use the getinfo command to display the results on my website.

I have been looking at some open source projects for tips and code that perhaps I could adjust and use but I have to be honest and say im finding it hard.

Thanks for any help offered !

Don't mind me asking, why not just use the blockchain api?
redhack
Legendary
*
Offline Offline

Activity: 1860
Merit: 1015


View Profile
December 13, 2015, 07:04:06 PM
 #3

Don't mind me asking, why not just use the blockchain api?

It's normal people don't want to use Blockchain.info services anymore. They are down all the time. They have server issues etc.
I'm looking for a similar service, let's see what people suggest.
jt byte
Hero Member
*****
Offline Offline

Activity: 994
Merit: 500



View Profile
December 13, 2015, 07:47:09 PM
 #4

Hi everyone a little help required  Smiley

I want to include in my website the balance of one of my BTC wallets

The wallet is local and running on my linux box as is the website, I dont want to use blockchain.info or similar I want to connect to my wallet direct using my rpc username and password and i guess use the getinfo command to display the results on my website.

I have been looking at some open source projects for tips and code that perhaps I could adjust and use but I have to be honest and say im finding it hard.

Thanks for any help offered !

I think this is quite easy to do with blockchain.info
https://blockchain.info/en/api
https://blockchain.info/en/api/api_receive

They got some usefull examples. If you are a coder you would be able to fetch the balance from the website with WGET
LuckyYOU
Sr. Member
****
Offline Offline

Activity: 280
Merit: 250



View Profile
December 13, 2015, 10:18:09 PM
 #5

You could use an iframe from the blockchain URL, sure it is not as fancy but it sure works and does the trick.
Or you could post a job for a coder to make such a script for you.

batesresearch
Legendary
*
Offline Offline

Activity: 2424
Merit: 1148


View Profile WWW
December 13, 2015, 10:22:03 PM
 #6

Hi everyone a little help required  Smiley

I want to include in my website the balance of one of my BTC wallets

The wallet is local and running on my linux box as is the website, I dont want to use blockchain.info or similar I want to connect to my wallet direct using my rpc username and password and i guess use the getinfo command to display the results on my website.

I have been looking at some open source projects for tips and code that perhaps I could adjust and use but I have to be honest and say im finding it hard.

Thanks for any help offered !

Have a look at this : https://en.bitcoin.it/wiki/PHP_developer_intro

This will get you started, if you want I can help you further just drop me a PM.

Visit Satoshi's Place, a Bitcoin Hub based in Bury, Manchester, UK.
Website: https://satoshisplace.co.uk
Goals: Educate & Onboard users in to Bitcoin. Lightning network⚡️
Hexception
Newbie
*
Offline Offline

Activity: 58
Merit: 0


View Profile
December 13, 2015, 11:53:47 PM
 #7

Basically this.

https://en.bitcoin.it/wiki/PHP_developer_intro#Getinfo_.28Bitcoind.27s_version_of_Hello_World.29

Read the getinfo to a variable, json_decode it and print balance.
BTC_1 (OP)
Full Member
***
Offline Offline

Activity: 148
Merit: 100



View Profile
December 15, 2015, 12:25:58 PM
Last edit: December 15, 2015, 01:37:42 PM by BTC_1
 #8

Hi everyone a little help required  Smiley

I want to include in my website the balance of one of my BTC wallets

The wallet is local and running on my linux box as is the website, I dont want to use blockchain.info or similar I want to connect to my wallet direct using my rpc username and password and i guess use the getinfo command to display the results on my website.

I have been looking at some open source projects for tips and code that perhaps I could adjust and use but I have to be honest and say im finding it hard.

Thanks for any help offered !

Have a look at this : https://en.bitcoin.it/wiki/PHP_developer_intro

This will get you started, if you want I can help you further just drop me a PM.

Thanks, that was exactly what I was looking for  Smiley

However its a little dangerous, if my bitcoin server is offline, the webpage throws our an error listing my rpc username, password, and port number.

Im trying to figure out a way of making the script NOT post the errors but am not having much luck Sad

EDIT - SOLVED

Decoded
Legendary
*
Offline Offline

Activity: 1232
Merit: 1030


give me your cryptos


View Profile
December 16, 2015, 07:41:45 AM
 #9

You can use the blockchain.info API quite easily. But as others have said, blockchain is down almost once a week. That's not very good, eh?

I heard that coinbase has an API, you could use that, or you could get someone to mod an automated software wallet.

looking for a signature campaign, dm me for that
Emerge
Legendary
*
Offline Offline

Activity: 854
Merit: 1000



View Profile
December 16, 2015, 08:02:36 AM
 #10

If you would search Github, there are lots of similar scripts that do what you need (or possibly even more)
btc_enigma
Hero Member
*****
Offline Offline

Activity: 688
Merit: 567


View Profile
December 17, 2015, 04:49:27 PM
 #11

You could use https://github.com/jgarzik/python-bitcoinrpc to connect using RPC and get balance

Rmcdermott927
Legendary
*
Offline Offline

Activity: 2254
Merit: 1140


View Profile
December 18, 2015, 04:09:39 AM
 #12

I don't mind helping you, I may even already have code written for that.   Do you need to display the balance of an entire wallet or just 1 address?

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!