Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Mahkul on January 19, 2011, 11:54:44 PM



Title: Easy way to show current balance on the website using PHP?
Post by: Mahkul on January 19, 2011, 11:54:44 PM
I would like to display my current account balance on my website (kind of like: So far X amount of BTC has been donated, where X obviously shows the balance of an address) using PHP, but I want to extract this from a Bitcoin wallet residing on a different machine than the web-server. Is it possible and if so, what's the easiest way to do this? Also, is it possible to show the overall state of my entire wallet using PHP, but again connecting to a remote machine (I know this is not a smart thing to do, but just curious)?


My problem is I have no way of installing Bitcoin application on my hosting account, so I need to extract this info from my own bitcoin application residing on my PC. Thanks in advance for any help with this.


Title: Re: Easy way to show current balance on the website using PHP?
Post by: tcatm on January 20, 2011, 12:39:11 AM
You could use BBE's getreceivedbyaddress: http://blockexplorer.com/q/getreceivedbyaddress/$address


Title: Re: Easy way to show current balance on the website using PHP?
Post by: semyazza on January 20, 2011, 10:43:29 PM
1)SSH tunnel from your hosting account, run the bitcoin balance command, parse and display.

2)Another way would be to set up a simple http server that supports cgi on the home computer and write a simple script to pull data from the client and display it.

3)Simple script that gets information from bitcoin client and then uploads a text file to your hosting server with the updated information.


Title: Re: Easy way to show current balance on the website using PHP?
Post by: Mahkul on January 20, 2011, 11:09:19 PM
1)SSH tunnel from your hosting account, run the bitcoin balance command, parse and display.

2)Another way would be to set up a simple http server that supports cgi on the home computer and write a simple script to pull data from the client and display it.

3)Simple script that gets information from bitcoin client and then uploads a text file to your hosting server with the updated information.

Thanks for taking the effort to write this - it will definitely help me!


Title: Re: Easy way to show current balance on the website using PHP?
Post by: TheBarMan on June 09, 2016, 07:36:39 PM
Hi, im taking this info for my future website.

i don know yet how add this to a mark list. just to the watchlist but nothing like markers or something like that.

this message is for help me to find it.


Title: Re: Easy way to show current balance on the website using PHP?
Post by: jaydipmodhwadia on June 09, 2016, 07:46:00 PM
Hi, im taking this info for my future website.

i don know yet how add this to a mark list. just to the watchlist but nothing like markers or something like that.

this message is for help me to find it.

You could press 'Watch' at the bottom to save it to your watchlist which is available in the top left of the website (just under your username)


Title: Re: Easy way to show current balance on the website using PHP?
Post by: TheBarMan on June 09, 2016, 08:04:32 PM
Hi, im taking this info for my future website.

i don know yet how add this to a mark list. just to the watchlist but nothing like markers or something like that.

this message is for help me to find it.

You could press 'Watch' at the bottom to save it to your watchlist which is available in the top left of the website (just under your username)


hi, i did it, but if any one put a Reply the list appears empty.