Solved

Bitcoin - how to use the blockchain info - need help

Posted on 2013-05-13
4
802 Views
Last Modified: 2013-05-30
Related to general question I started here
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28102652.html

Can someone give me a simple Hello World type of direction so that I can make my prototype web application (in Classic ASP) 'hear' a transaction from 'Alice to Bob' (Person A to person B)?

For example, (1) how can my application 'listen' (2) what will it 'hear' and (3) then I need to translate that to the From Address and To Address and how many bitcoins. That's all for this stage.

I'm guessing and hoping that I can use the Simple Query API shown here.
http://blockchain.info/q

I'm hoping that I can get that by a Request.QueryString("????")

Thanks.
0
Comment
Question by:hindersaliva
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 35

Expert Comment

by:Terry Woods
ID: 39163382
So are you wanting to detect the transaction before it's confirmed in a block?
0
 

Author Comment

by:hindersaliva
ID: 39164400
Terry, hey thanks.
No, I'm at an even earlier stage of Hello World - so to detect the transaction at any time (after confirmed).

I'm challenged by:
I'm classic ASP and the code samples are PHP. So got to so a crash-course in PHP or translate the samples to classic ASP to understand what's going on.

I got a classic ASP/JSON demo to work.

So, in short, a PHP page that will detect a transaction is a good start for me at this (early) point.
0
 
LVL 35

Accepted Solution

by:
Terry Woods earned 500 total points
ID: 39169860
I wonder if this page is of use? http://blockchain.info/api/api_receive

It provides details of a mechanism where the blockchain.info server sends your server a confirmation when a payment has been received (or confirmed - you choose the number of confirmations to wait for).

If you are receiving bitcoins to an address that has just been created, then just checking the balance may be adequate. I think this command should work in PHP:
print file_get_contents("http://blockchain.info/q/addressbalance/12L9q9Z9kc4wXq7AoosMprc2Furt9iC9Rg?confirmations=6");

Open in new window


The response appears to be a balance in satoshis. ie Divide it by 100,000,000 to get a balance in BTC.

You can also just browse to the URL in your browser:
http://blockchain.info/q/addressbalance/12L9q9Z9kc4wXq7AoosMprc2Furt9iC9Rg?confirmations=6

Adjust the confirmations parameter to suit your purposes. The higher the transaction value, the more confirmations you should wait for, depending on the nature of your product.
0
 

Author Comment

by:hindersaliva
ID: 39209383
Thanks Terry. I'm taking a break from this project for a few months. So shall close the question.

I appreciate your help over and above the call of duty :)
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question