-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 May 18 '15 at 16:13
  • Did you try reading this? en.bitcoin.it/wiki/PHP_developer_intro – Nick ODell May 18 '15 at 16:56
  • it'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 May 19 '15 at 4:23
  • @ShahadatHossain The page I linked has several examples. Did you read it, or try any of them? – Nick ODell May 19 '15 at 6:42
  • 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 May 19 '15 at 6:51
1

firstly Setup bitcoin Core API server on your pc.

then install Php-curl for your Apache server.

then Follow Link: en.bitcoin.it/wiki/PHP_developer_intro

put api command as function name and if have any Parameters then put in function parameter. i hope it will work.give you result as json format.

Must On your Display Error in php.ini

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.