Post
Topic
Board Project Development
Re: My code is wrong and I cant figure it out :-\
by
The_Trader
on 07/03/2022, 21:16:26 UTC
I would try this:
Code:
  require_once 'jsonRPCClient.php';
 
  $bitcoin = new jsonRPCClient('http://xxxxxxxx:xxxxxxxxxxxxxxxxxxxxxx@176.31.183.107:27772/');
  echo print_r($bitcoin);
  echo "<pre>\n";
  echo print_r($bitcoin->getbalance());
  echo "</pre>";

than look at the source of the page rendered.

print_r itself represent a string. You must echo it to print it.

If it appears that "bitcoin" is NULL or some error object, it may not be connecting. The info there you would get there may give you some insight.

You may also consider looking into:
Code:
ini_set('display_errors', 1);
error_reporting(E_ALL);

It's throwing an error I have never seem before:

Code:
[07-Mar-2022 21:11:03 UTC] PHP Fatal error:  Uncaught Exception: Incorrect response id (request id: 1646687463, response id: )