Author

Topic: Simple script that will display balance on a website (Read 2320 times)

legendary
Activity: 2254
Merit: 1140
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?
hero member
Activity: 688
Merit: 565
You could use https://github.com/jgarzik/python-bitcoinrpc to connect using RPC and get balance
legendary
Activity: 854
Merit: 1000
If you would search Github, there are lots of similar scripts that do what you need (or possibly even more)
legendary
Activity: 1232
Merit: 1030
give me your cryptos
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.
full member
Activity: 148
Merit: 100
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
newbie
Activity: 58
Merit: 0
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.
legendary
Activity: 2424
Merit: 1147
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.
sr. member
Activity: 280
Merit: 250
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.
hero member
Activity: 994
Merit: 500
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
legendary
Activity: 1860
Merit: 1015
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.
full member
Activity: 140
Merit: 100
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?
full member
Activity: 148
Merit: 100
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 !
Jump to: