This is the first array coming from
Code: Select all
json_decode(file_get_contents("http://127.0.0.1:8125/burst?requestType=getAccount&account=".$_GET['acc']))Code: Select all
{
"publicKey": "231add65e7233e8df06debe3e71f161cb8975d21c9f9ee6e52f4868f524cb64d",
"assetBalances": [
{
"asset": "15295227971848272658",
"balanceQNT": "4205"
},
{
"asset": "11375670541237055652",
"balanceQNT": "15"
}
],
"guaranteedBalanceNQT": "0",
"balanceNQT": "5465615075791",
"name": "Irontiga",
"accountRS": "BURST-KHTJ-G3H7-LD2Q-H7LJ6",
"unconfirmedAssetBalances": [
{
"unconfirmedBalanceQNT": "4205",
"asset": "15295227971848272658"
},
{
"unconfirmedBalanceQNT": "15",
"asset": "11375670541237055652"
}
],
"account": "17456591454562991920",
"effectiveBalanceNXT": 0,
"unconfirmedBalanceNQT": "4870615075791",
"forgedBalanceNQT": "0"
}
Code: Select all
json_decode(file_get_contents("http://127.0.0.1:8125/burst?requestType=getAsset&asset=".$assetID))Code: Select all
{
"decimals": 1,
"numberOfTrades": 58,
"asset": "15295227971848272658",
"quantityQNT": "1000000",
"description": "Shares in BURST pool. See https://burstforum.com/index.php?threads/the-big-announcement.149/ for more details",
"name": "HardInvest",
"accountRS": "BURST-T7BK-USTG-KVKC-D2RDL",
"account": "13343849956527346993"
}Code: Select all
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<?php
$account = json_decode(file_get_contents("http://127.0.0.1:8125/burst?requestType=getAccount&account=".$_GET['acc']));
echo $account->name;
foreach($account->assetBalances as $assetBalance)
{
assetID = $assetBalance['asset'];
$assetInfo = json_decode(file_get_contents("http://127.0.0.1:8125/burst?requestType=getAsset&asset=".$assetID));
echo $assetInfo['description'];
echo "<br>";
}
?>
</body>
</html>