Skip to main content
deleted 53 characters in body
Source Link

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 a value but I'm not quite sure it's correctan error, how does it technically work like this?

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 a value but I'm not quite sure it's correct, does it technically work like this?

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?

Source Link

Run specific RPC commands in PHP?

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 a value but I'm not quite sure it's correct, does it technically work like this?