Quote from: satoshi on July 25, 2010, 9:44:16 PM UTCThat’s strange, didn’t someone just say that was supposed to work? (what library was he using?) Post if you figure out what wrong.
That was me; I’m using the library at
http://jsonrpcphp.org/(download athttp://jsonrpcphp.org/download.php?file=tgz&package=light), and I can confirm that this works: Code: require_once ‘jsonRPCClient.php’; $bitcoin = new jsonRPCClient(‘http://username:password@localhost:8332/’); echo $bitcoin->getblockcount(); ?>
not for me, that’s what i tried first, cuz it’s on the wiki.
this is all i get from jsonRPCClient:
Warning: fopen(http://…@localhost:8332/ (http://...@localhost:8332/)) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.0 401 Authorization Required in …\jsonRPCClient.php on line 132
also couldn’t get curl to authorize yet, all i get is ..curl_error():transfer closed with 15 bytes remaining to read.. which results in a “bad json-syntax” of course
testing on php5.3.0 curl7.19.4. and open for ideas.