Author

Topic: PHP connecting to Bitcoin (Solved) (Read 1520 times)

hero member
Activity: 740
Merit: 501
April 25, 2013, 11:22:58 AM
#10
i am using
rpcallowip=192.168.*.*
rpcport=8332
on conf
and on php part

require_once('jsonRPCClient.php');
$b = new jsonRPCClient('http://user:[email protected]:8332/');

i make my calls to api like this
$b->getbalance('*',0);

hope that helps

It's already solved but thanks for the effort, that's what counts  Wink
hero member
Activity: 655
Merit: 500
April 25, 2013, 08:58:17 AM
#9
i am using
rpcallowip=192.168.*.*
rpcport=8332
on conf
and on php part

require_once('jsonRPCClient.php');
$b = new jsonRPCClient('http://user:[email protected]:8332/');

i make my calls to api like this
$b->getbalance('*',0);

hope that helps
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
April 25, 2013, 08:34:23 AM
#8
Also you can simplify things by using my library (still in development but i always push out stables releases) http://BitcoinDevKit.com

100,000$ for something that already exists, amazing.

That made no sense
hero member
Activity: 740
Merit: 501
April 25, 2013, 03:14:30 AM
#7
Also you can simplify things by using my library (still in development but i always push out stables releases) http://BitcoinDevKit.com

10,000$ for something that already exists, amazing.
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
April 24, 2013, 08:49:26 PM
#6
Also you can simplify things by using my library (still in development but i always push out stables releases) http://BitcoinDevKit.com
hero member
Activity: 740
Merit: 501
April 24, 2013, 06:18:48 PM
#5
Had to sent a message to my host to open the port in the end, thanks for all the help guys.
sr. member
Activity: 448
Merit: 254
April 24, 2013, 05:19:51 PM
#4
it is not clear to me what it is you can connect to using Google Chrome

I think he's saying if he puts the JSON-RPC HTTP addresses into Chrome, he gets some kind of response showing bitcoind is indeed listening on that IP and port.
member
Activity: 110
Merit: 10
April 24, 2013, 05:08:33 PM
#3
I am not sure if you found your solution yet, but it is not clear to me what it is you can connect to using Google Chrome. You are using PHP, so are you trying to run the PHP script from the command line, or from a browser that is not Google Chrome?
newbie
Activity: 18
Merit: 0
April 20, 2013, 10:16:29 PM
#2
Can you run the script on the machine running bitcoind to isolate the allowip setting? Maybe this is not the issue if you can connect from Chrome...

I would add a try catch around the block and check out any details of an exception.

try {
   ...
} catch (Exception $e){
   echo $e;
}

Be careful though this might print your connection details...
hero member
Activity: 740
Merit: 501
April 20, 2013, 11:23:44 AM
#1
I am using:

Code:

 
require_once 'jsonRPCClient.php';
 
  
$client = new jsonRPCClient('http://user:pass@ip:8334/');
  
print_r($client->getinfo());
?>

And getting the error Incorrect response id (request id: 1, response id: ) even though I can connect through my own ip using Google Chrome.

Bitcoind has * in the settings for allow ip at the moment
Jump to: