Author

Topic: List of Transactions? (Read 581 times)

full member
Activity: 140
Merit: 100
April 18, 2015, 05:15:34 PM
#6
Is there a possible way to convert this php into html?

No, HTML can not do the same functions as PHP.
You see I don't know how to use php for my site and I don't know which area on my server I have to save it.
legendary
Activity: 1442
Merit: 1179
April 18, 2015, 05:09:17 PM
#5
Is there a possible way to convert this php into html?

No, HTML can not do the same functions as PHP.
full member
Activity: 140
Merit: 100
April 18, 2015, 04:34:24 PM
#4
full member
Activity: 140
Merit: 100
April 18, 2015, 03:15:10 PM
#3
legendary
Activity: 1442
Merit: 1179
April 18, 2015, 02:07:05 PM
#2
You can do this with blockchain.info's API and a little PHP.  https://blockchain.info/api/blockchain_api

Code:
https://blockchain.info/address/$bitcoin_address?format=json

Use PHP and change the code below to have $bitcoin_address equal your address that you want to monitor for new transactions.

The below code will work for MOST standard transactions. Save the below code as a PHP file and run it on your server. It's a little buggy since it will also show transactions going out from this address, but it's a start.
Example: http://btcthreads.com/getBalance.php

Code:

$bitcoin_address "12DR75wMiV9YiBS5KcSLrQCWeK2WR32N4N"//Replace this with your address you want to monitor
$jsonData "https://blockchain.info/address/$bitcoin_address?format=json";
$getTx json_decode(file_get_contents($jsonData), true);
$totRec $getTx["total_received"];
$convert $totRec 0.00000001;

$finBal $getTx["final_balance"];
$finCon $finBal 0.00000001;

//Most recent tx
$sentAmount $getTx["txs"][0]["out"][0]["value"];
$sentAmountBTC $sentAmount 0.00000001;
$sentBy $getTx["txs"][0]["inputs"][0]["prev_out"]["addr"];

//2nd Most recent tx
$sentAmount2 $getTx["txs"][1]["out"][0]["value"];
$sentAmountBTC2 $sentAmount2 0.00000001;
$sentBy2 $getTx["txs"][1]["inputs"][0]["prev_out"]["addr"];

//3rd Most recent tx
$sentAmount3 $getTx["txs"][2]["out"][0]["value"];
$sentAmountBTC3 $sentAmount3 0.00000001;
$sentBy3 $getTx["txs"][2]["inputs"][0]["prev_out"]["addr"];

//4th Most recent tx
$sentAmount4 $getTx["txs"][3]["out"][0]["value"];
$sentAmountBTC4 $sentAmount4 0.00000001;
$sentBy4 $getTx["txs"][3]["inputs"][0]["prev_out"]["addr"];

?>






MY FUND RAISER


SEND DONATIONS TO:


echo $getTx["address"]; ?>


So far we have received: echo $convert " BTC"?>





Latest Donations:



 echo $sentAmountBTC?> BTC sent by echo $sentBy?>

 echo $sentAmountBTC2?> BTC sent by echo $sentBy2?>

 echo $sentAmountBTC3?> BTC sent by echo $sentBy3?>
 



full member
Activity: 140
Merit: 100
April 18, 2015, 01:28:59 PM
#1
How can I show a list of transactions of my website automatically?
Like right when someone deposits to a specific address I want it to be shown right beside a list of other transactions saying the sender address, amount, date time.
I'm not really an expert in developing and website designing and coding so if you can help me that would be great!
Jump to: