I need help with some JSON Parsing using PHP...
I'll show you the code first then tell you where my problem lies.
$address = "1CaiKQcVSF2hY5sHgtirfK5ytLSZHXkxB2";
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_URL, "https://blockchain.info/address/$address?filter=1&format=json");
$output = curl_exec($ch);
curl_close($ch);
$a=json_decode($output,TRUE);
?>
# | Date Sent | Address(es) | Amount Sent |
---|---|---|---|
($counter++); ?> | (date("Y-m-d",$tx["time"])); ?> | ($tx["out"][0]["addr"]); ?> | foreach($inputs as $num=>$inDetails){ if($inDetails["addr"]==$address){ $value=$inDetails["value"]; } } ?> (round($value/100000000, 4)); ?>BTC (($tx["hash"]); ?>">TX) |
Right now, the Columns that work are all of them but the last one.
The last one is supposed to show the amount received in the transaction... but I had to code it so that it wouldn't just take the whole transaction value. I'm not quite sure where I messed up with that but it's somewhere...
If someone could help me with this, it'd be greatly appreciated... and I wouldn't mind emptying that wallet balance to you.