Author

Topic: Looking for a line of code that will read transactions values on the blockchain (Read 591 times)

member
Activity: 102
Merit: 10
nice, will work on that.

I found a link on Websocket API
https://blockchain.info/api/api_websocket

going to read up on this, thinks its going to be the best route.
sr. member
Activity: 448
Merit: 254
Use the json_decode() function.  Here's an easy way to copy-paste chunks of JSON into PHP:

Code:
var_dump(json_decode(<<{
"hash":"b6f6991d03df0e2e04dafffcd6bc418aac66049e2cd74b80f14ac86db1e3f0da",
"ver":1,
"vin_sz":1,
"vout_sz":2,
"lock_time":"Unavailable",
"size":258,
"relayed_by":"64.179.201.80",
    "block_height": 12200,
"tx_index":"12563028",
"inputs":[


{
"prev_out":{
"hash":"a3e2bcc9a5f776112497a32b05f4b9e5b2405ed9",
"value":"100000000",
"tx_index":"12554260",
"n":"2"
},
"scriptSig":"Unavailable"
}

],
"out":[

{
"value":"98000000",
"hash":"29d6a3540acfa0a950bef2bfdc75cd51c24390fd",
"scriptPubKey":"Unavailable"
},
        
{
"value":"2000000",
"hash":"17b5038a413f5c5ee288caa64cfab35a0c01914e",
"scriptPubKey":"Unavailable"
}
        
]
}
JSON
));

Replace the stuff between <<
member
Activity: 102
Merit: 10
and submit them into a SQL database.

Anyone got some good “for dummies” write ups on how to implement the blockchain.info api into a website like that?

trying to make sense of this
http://blockchain.info/api/blockchain_api
Jump to: