Bitcoin Forum
June 03, 2024, 11:27:01 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: jsonPRC Client & Server Implementation (Hello World!)  (Read 693 times)
airborne305 (OP)
Newbie
*
Offline Offline

Activity: 27
Merit: 0


View Profile
April 15, 2013, 04:11:02 AM
Last edit: April 15, 2013, 04:57:41 AM by airborne305
 #1

*** Transfer Post - Second Post ***

I kind of dove into the whole bitcoin/p2pool/LAMP thing late last week, so i'm sure i'm in over my head here.

I have read over https://en.bitcoin.it/wiki/PHP_developer_intro and https://en.bitcoin.it/wiki/API_reference_(JSON-RPC) which are great, but don't really provide much info for the complete newbies.

I'm stuck at "Hello World." i followed the instructions. But I would like a little more detail/instruction of proper placement and implementation of the JSON RPC Client and Server. When following the instruction, i get the below response in the browser. [I do change the username/password/port info].

Response i get
Code:
require_once 'jsonRPCClient.php'; $bitcoin = new jsonRPCClient('http://user:password@127.0.0.1:8332/'); echo "
\n";
  print_r($bitcoin->getinfo());
  echo "
";


I'm also looking for advise on retrieving the information. Example, i want to post info from bitcoin and post it on a site. Would it be more practical to have my webpage (PHP) pull the information directly and post it on the page? or would it be a better idea to have Python (or even PHP) running in the back-end updating a mySQL database, and the website pull the information from the DB?


***EDIT***
Sorry, i should have mentioned i am using bitcoind, p2pool on a Ubuntu LAMP machine.

bitcoin and p2pool are configured correctly and i can mine locally.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!