PHPackages                             delboy1978uk/phpbitcoin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. delboy1978uk/phpbitcoin

ActiveLibrary[HTTP &amp; Networking](/categories/http)

delboy1978uk/phpbitcoin
=======================

A PHP service for connecting to bitcoind. Also compatible with Zend Framework 2.

072PHP

Since Aug 28Pushed 10y ago1 watchersCompare

[ Source](https://github.com/delboy1978uk/PHPBitcoin)[ Packagist](https://packagist.org/packages/delboy1978uk/phpbitcoin)[ RSS](/packages/delboy1978uk-phpbitcoin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHPBitcoin
==========

[](#phpbitcoin)

[![Build Status](https://camo.githubusercontent.com/393c5b17270d4386c1e18dc2e8916e756cccbb1cecc5bd155dae3964a13a9ee2/68747470733a2f2f7472617669732d63692e6f72672f64656c626f7931393738756b2f504850426974636f696e2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/delboy1978uk/PHPBitcoin) [![Code Coverage](https://camo.githubusercontent.com/67a1b43ce6cb3ab8b772c3a148e501f0cb16448e1162abc10e2f0a24886defc9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64656c626f7931393738756b2f504850426974636f696e2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/delboy1978uk/PHPBitcoin/?branch=master) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/01f05bc3d5490684d46a719cc327c8b448e34b568c870a926ff3a24c955812c2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64656c626f7931393738756b2f504850426974636f696e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/delboy1978uk/PHPBitcoin/?branch=master)
A PHP service for connecting to bitcoind. Also compatible with Zend Framework 2 ##Installation Installation is done through composer:

```
composer require delboy1978uk/phpbitcoin

```

\##Usage

```
use Del\Bitcoin;

$config = [
    'username' => 'YOURUSERNAME', // required
    'password' => 'YOURPASSWORD', // required
    'host' => '127.0.0.1',    // default
    'port' => '8332',         // default
    'protocol' => 'http',     // default
    'ssl_certificate' => '',  // default @todo
];

$btc = new Bitcoin($config);

//example
$info = $btc->getControlApi()->getInfo();

/* sample output
{
    "result":{
        "version":119900,
        "protocolversion":70002,
        "walletversion":60000,
        "balance":0.00000000,
        "blocks":531329,
        "timeoffset":0,
        "connections":8,
        "proxy":"",
        "difficulty":1,
        "testnet":false,
        "keypoololdest":1439840037,
        "keypoolsize":101,
        "paytxfee":0.00000000,
        "relayfee":0.00001000,
        "errors":""
    },
    "error":null,
    "id":"phpbitcoin"
}
*/
```

\###API's The Bitcoin object has access to each of the different API's available

```
$btc->getBlockchainApi();
$btc->getControlApi();
$btc->getGeneratingApi();
$btc->getMiningApi();
$btc->getNetworkApi();
$btc->getRawTransactionApi();
$btc->getUtilityApi();
$btc->getWalletApi();
```

Each API has docblock comments from the documentation, so you should get nice code completion. However the actual Bitcoin API docs can be found at

\##Usage in ZF2 Still todo ##Installing bitcoind for development puPHPet files for Vagrant included. Just vagrant up, vagrant ssh, then install Bitcoin. Unfortunately the ability to add custom repositories is not in puPHPet (yet. see [puphpet/puphpet#142](https://github.com/puphpet/puphpet/issues/142))

```
sudo apt-get install python-software-properties
sudo add-apt-repository --yes ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libboost-all-dev libdb4.8-dev libdb4.8++-dev bitcoind
cd ~
mkdir .bitcoin
cd .bitcoin
nano bitcoin.conf

```

Put the following info in the conf file:

```
server=1
daemon=1
testnet=1
rpcuser=phpbitcoin
rpcpassword=COMPLETELYrandomPASSWORD

```

You should use the testnet option if developing, tests connect on port 18332! Finally run bitcoind by simply typing it

```
bitcoind

```

Shut down bitcoind using the bitcoin-cli command

```
bitcoin-cli stop

```

\##Donate If you like PHPBitcoin, spare half a shekel for an old ex leper. 1De1boyXJzdk4TYmHkR3st6dJmHuEaneHB

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f20859ab2082170605b5961bb1f12493b087b08b7efa3ab0087ddbe0c9e0a94c?d=identicon)[delboy1978uk](/maintainers/delboy1978uk)

---

Top Contributors

[![delboy1978uk](https://avatars.githubusercontent.com/u/2684575?v=4)](https://github.com/delboy1978uk "delboy1978uk (116 commits)")

### Embed Badge

![Health badge](/badges/delboy1978uk-phpbitcoin/health.svg)

```
[![Health](https://phpackages.com/badges/delboy1978uk-phpbitcoin/health.svg)](https://phpackages.com/packages/delboy1978uk-phpbitcoin)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78026.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48347.0M384](/packages/php-http-curl-client)[smi2/phpclickhouse

PHP ClickHouse Client

84310.1M71](/packages/smi2-phpclickhouse)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
