-1
i want to build a bitcoin third party server for my client.
but problem is that when i execute "bitcoin-cli" command using php then it didn't give any result.
i used JSONRPCClient. but i didn't find any solution and how to use it can't understand.
here i have to give "user:password@127.0.0.1:8338" . is this my pc user and password???
do i need bitcoin authentication for this? or give me some suggestion to make it live.
This script doesn't produce any output:
require_once 'jsonRPCClient.php';
$bitcoin = new jsonRPCClient('http://bitcoinrpc:HGySbCZrdHq5BDQH3iwzb3oGZCJX8AfWe2EBQrNg9EvJ@127.0.0.1:8332/');
echo "<pre>";
print_r($bitcoin);
echo "<pre>\n fgfgf";
print_r($bitcoin->getinfo());
echo "</pre>";
Sounds like a PHP question. Otherwise, missing details from bitcoin.conf that would help debug this, like is the RPC even set up to service requests from the IP? Is it hosted on the same server? – karimkorun – 2015-05-18T16:13:39.933
Did you try reading this? https://en.bitcoin.it/wiki/PHP_developer_intro
– Nick ODell – 2015-05-18T16:56:59.467it's my local server. it's php question.bitcoin.conf has only rpcuser and rpcpassword. how can i start??? @karimkorun------------------------------ i tried developer intro . but i won't understand how and where is the function details,
$bitcoin->getinfo()?there is no function details in JSONRPC. if i have to write this function then how i can start?? i need a example of function.. @NickODell – Md Shahadat Hossain – 2015-05-19T04:23:54.333@ShahadatHossain The page I linked has several examples. Did you read it, or try any of them? – Nick ODell – 2015-05-19T06:42:19.993
yes i have read those example before and after this post submit. but where is getinfo details. if it's submit by _call function then it does not give me any output. what should i do now??? @NickODell – Md Shahadat Hossain – 2015-05-19T06:51:24.867
require_once 'jsonRPCClient.php'; $bitcoin = new jsonRPCClient('http://bitcoinrpc:HGySbCZrdHq5BDQH3iwzb3oGZCJX8AfWe2EBQrNg9EvJ@127.0.0.1:8332/'); echo "<pre>"; print_r($bitcoin); echo "<pre>\n fgfgf"; print_r($bitcoin->getinfo()); echo "</pre>";– Md Shahadat Hossain – 2015-05-19T06:53:20.760It doesn't produce any output? Not even the
echo "<pre>";? Does it hang? – Nick ODell – 2015-05-19T08:28:55.040