Author

Topic: Displaying my coin balance on a website using PHP (Read 68 times)

legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
Try setting up a web server with CGI or FPM and placing that PHP in a server-side script, then from your HTML call the PHP script with no arguments.

I don't think it's going to work if you place the PHP directly in the HTML because you can't require anything from it.
member
Activity: 180
Merit: 52
Hi I am also trying to display my bitcoin balance.

I have found some examples like this:

Code:
  require_once 'jsonRPCClient.php';
  
  $bitcoin = new jsonRPCClient('http://user:[email protected]:8332/');
  
  echo "
\n";
  print_r($bitcoin->getblockchaininfo());
  echo "
";

But the output of that is blank page, the IP is changed to my dedicated server and the port number is apparently the default one so i left as it is but I have no clue if that is right but in any event should it not at least throw out an error?

Thanks
TT
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
Given that colussusxt is an altcoin you will have a better chance of getting an answer if you move this to the altcoins board.
member
Activity: 180
Merit: 52
Hi so its been a while since I needed to do this and it looks like my coding knowledge is well behind.

So I have a dedicated server with several wallets running on, and I want to display my coin balance amongst other things on a webpage (PHP)

In the past I would have created  a config file with :
rpcuser=
rpcpassword=
And simply connected with the daemon to fetch the info I required, however I have just tried this with colossusxt and my terminal has thrown this out at me:
Error: There is no RPC client functionality in colxd anymore. Use the colx-cli utility instead.

Could some one explain what the cli utility is or even better does anyone have an example bit of code used for pulling the info from the deamon and displaying on a web page?

Many Thanks
TT
Jump to: