nbobtc / bitcoind-php

Low level PHP wrapper around bitcoind
MIT License
166 stars 62 forks source link

Add require_once description pls #33

Open Dmatafonov opened 6 years ago

Dmatafonov commented 6 years ago

It could be a good idea for such noobies as as me to add require_once installation instructions. Its real pain in the ass to figure out how to start working with lib.

I've downloaded it through git clone. Then I've created php file and added two main (as I think) files

require_once Nt_Path::get()->scripts . '/btc/lib/Http/Client.php';

require_once Nt_Path::get()->scripts . '/btc/lib/Command/Command.php';


but it doesnt work, I assume it should be added somehow else... but how?

Im trying to use the library in pretty old zend framework, is there an easy require way of installing it?

dlwhitehurst commented 6 years ago

I've installed Composer locally to my php file and globally on my macbook and I'm having the same problem. "Class 'Nbobtc\Command\Command' not found ..". If I figure this out, I'll leave another comment.

dlwhitehurst commented 6 years ago

You should use Composer for PHP libraries moving forward. I forked this repo and added a require statement after you install Composer locally and create a composer.json with ... { "require": { "nbobtc/bitcoind-php": "2.1.*" } } I also created a pull-request to have this require added in the usage section of the README.md.