[英]how to put wallet contents in PHP?
I am trying to integrate waves tokens in my website, it runs on joomla, and I know a bit about php. 我正在尝试将wave令牌集成到我的网站中,它在joomla上运行,并且我对php有所了解。 I successfully integrate my token's ticker using your api.
我已使用您的api成功集成了令牌的代码。
My issue? 我的问题? I use php, I would like to know if someone could help me or if there exist and exhaustive documentation about it
我使用php,我想知道是否有人可以帮助我,或者是否存在有关它的详尽文档
Big thanks to all helpers. 非常感谢所有帮手。
Wanna see my current integration ? 想看我目前的整合吗? : https://www.itharagaian.net/main/index.php/bastion-token/getting-bastion-tokens
: https : //www.itharagaian.net/main/index.php/bastion-token/getting-bastion-tokens
I finally found how to do. 我终于找到了方法。
Balance = 余额=
$curl = curl_init();
$opts = [
CURLOPT_URL => 'https://nodes.wavesplatform.com/assets/balance/3PC1NwcrvR9EwDCZ4na2q1RrUY21M5RMg7W/9dmvLmq8iK4aXTHk21Fdi3Tjf2XJUHUoBokvS7zsG7Sn',
CURLOPT_RETURNTRANSFER => true,
];
curl_setopt_array($curl, $opts);
$response = curl_exec($curl);
curl_close($curl);
$balance= json_decode($response, true);
echo "This account has ";
echo $balance[balance]/100000000;
echo "Bastion Tokens";
?>
And list of wallets 和钱包清单
<?php
$curl = curl_init();
$opts = [
CURLOPT_URL => 'https://nodes.wavesplatform.com/assets/9dmvLmq8iK4aXTHk21Fdi3Tjf2XJUHUoBokvS7zsG7Sn/distribution',
CURLOPT_RETURNTRANSFER => true,
];
curl_setopt_array($curl, $opts);
$response = curl_exec($curl);
curl_close($curl);
$balance= json_decode($response, true);
echo "<br>";
echo "<table><tr><th>NBR</th>< th>WALLET</th><th>VALUE</th></tr>";
foreach ($balance as $address => $amount) {
$i=$i+1;
echo "<tr><td>";
echo $i;
echo "</td><td>";
echo $address;
$wallet[$i] = $address;
echo " </td><td>";
echo round($amount/100000000);
$value[$i]= round($amount/100000000);
echo " Bastion</td>";
echo "</tr>";
}
echo "</table>";
?>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.