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:

&lt;?php
  require 'header.php';
  include 'Includes/Bitcoin/easybitcoin.php';
  $bitcoin = new Bitcoin('user', 'password', 'localhost', '8332');
  $wallet = $_SESSION['UserWallet'];
  $balance = $bitcoin-&gt;getbalance($wallet);
?&gt;
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;meta charset="utf-8"&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body style="font-family: sans-serif;"&gt;
  &lt;b&gt;Wallet address: &lt;?php print_r($wallet); ?&gt;&lt;/b&gt;
  &lt;br /&gt;
  &lt;b&gt;Account balance: ฿&lt;?php print_r($balance); ?&gt;&lt;/b&gt;
&lt;/body&gt;
&lt;/html&gt;


Where the $_SESSION['UserWallet'] contains the bitcoin address, when I run this it returns an error, how does it work?
To get the balance of something you need an account, which is best created dynamically with PHP. You would use the getnewaddress("echo uniqid()"); in PHP as an example of generating a new account for every user.