Beertastic
Beertastic

Reputation: 711

PHP Bitcoin TestNet using Denpa\Bitcoin "Empty reply from server"

I'm new to BTC development, so sorry if I get any key words wrong!

My Setup:

My bitcoin.conf file

testnet=1
rest=1                    
txindex=1
disablewallet=1
printtoconsole=1
rpcuser=user
rpcpassword=pass
rpcallowip=192.168.1.184

My Main Controller method:

public function index()
    {
        $ip = '192.168.1.184';
        $bitcoind = new BitcoinClient('http://user:pass@'.$ip.':18333');

        $block = $bitcoind->getinfo();
        dd($block);
    }

When I ping my application via a web link I get this error: Denpa\Bitcoin\Exceptions\ConnectionException cURL error 52: Empty reply from server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

And I don't know why. I've used other Api calls from this list: https://en.bitcoinwiki.org/wiki/Original_Bitcoin_client/API_calls_list and get the same result.

Is there any 'better' tutorial or BTC for dummies sites out there?

Eventually I just want to be able to Scan the ledger for incoming payments to my wallet address, then pay various people 'automatically' based on my own settings.

So my questions:

  1. Any thoughts on my Empty reply issue?
  2. Does anyone know if this repo can be used to send payment instructions to a wallet?

Many thanks for reading!

Upvotes: -1

Views: 610

Answers (1)

Beertastic
Beertastic

Reputation: 711

So, I did lots of tweaking, poking and testing.. nothing worked.

I decided to just do a fresh Laravel install and just add a single package, the one listed above.. and it worked instantly.

Urgh, I love tech sometimes...

Upvotes: -1

Related Questions