0
I'm trying to get the balance of a specific address in my PHP session, I currently have this:
<?php
require 'header.php';
include 'Includes/Bitcoin/easybitcoin.php';
$bitcoin = new Bitcoin('user', 'password', 'localhost', '8332');
$wallet = $_SESSION['UserWallet'];
$balance = $bitcoin->getbalance($wallet);
?>
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
</head>
<body style="font-family: sans-serif;">
<b>Wallet address: <?php print_r($wallet); ?></b>
<br />
<b>Account balance: ฿<?php print_r($balance); ?></b>
</body>
</html>
Where the $_SESSION['UserWallet'] contains the bitcoin address, when I run this it returns an error, how does it work?
That is not how the getbalance RPC works. – Pieter Wuille – 2019-04-07T23:02:53.953
Perhaps read the documentation before trying to make a product that handles other people's money. – Anonymous – 2019-04-08T01:09:22.620
@PieterWuille What parameters are used? Can they be variables in any way? – frogman578 – 2019-04-08T07:28:23.753