PHPackages                             aflorea4/block\_io-php - 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. [Payment Processing](/categories/payments)
4. /
5. aflorea4/block\_io-php

ActiveLibrary[Payment Processing](/categories/payments)

aflorea4/block\_io-php
======================

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

1.3.6(5y ago)0419MITPHPPHP &gt;=7.2.0

Since Jul 1Pushed 5y agoCompare

[ Source](https://github.com/aflorea4/block_io-php)[ Packagist](https://packagist.org/packages/aflorea4/block_io-php)[ Docs](https://github.com/aflorea4/block_io-php/)[ RSS](/packages/aflorea4-block-io-php/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)DependenciesVersions (26)Used By (0)

Block.io PHP
============

[](#blockio-php)

**Current Release**: 1.3.5

**09/12/20**: Change \_withdraw and \_sweep names for further disambiguation from actual API endpoints.
**08/15/20**: Add cURL headers for requests.
**07/03/20**: Use implode() instead of join() to remove PHP7.4 warning.
**07/01/20**: Use low R signatures by default.
**06/02/20**: Replace deprecated array\_key\_exists. Tested for PHP7.2, PHP7.3, PHP7.4. Support for earlier (EOL) versions of PHP is not guaranteed.
**05/10/19**: Minor updates. Tested for PHP7.x.
**09/10/17**: Replace mCrypt with OpenSSL. PHP5.6+ only.
**02/06/17**: Enforce use of TLSv1.2.
**01/29/15**: Added support for getting Wallet Import Format private keys from custom keys.
**01/19/15**: Added support for sweeping legacy keys.
**01/09/15**: Added sweep functionality.
**11/03/14**: Fix DER signature encoding. Now stable.
**18/10/14**: Enforcing Determinism in Signatures (RFC6979), also using BIP62 to hinder transaction malleability.
**15/10/14**: Enforce use of TLSv1, step away from the vulnerable SSLv3.
**10/10/14**: Added 3 of 4 MultiSig example.
**09/28/14**: Updated for v2 handling.

PHP wrapper for [Block.io](https://block.io/) for use with [Dogecoin](http://dogecoin.com/), [Bitcoin](http://bitcoin.org/), and [Litecoin](http://litecoin.org). API key validation on instantiation, simple abstraction layer on top of existing API interfaces, and automatic JSON decoding on response.

### Requirements

[](#requirements)

This library requires the 'gmp', and cURL extensions for PHP. To enable these extensions, see:

[GMP Installation Guide](http://php.net/manual/en/gmp.installation.php)

[cURL Installation Guide](http://php.net/manual/en/curl.installation.php)

### Warning

[](#warning)

If you're using Windows, beware that SSL will not function properly, and this library will throw errors.

To fix the SSL issue on Windows, please do the following:

Download  to a directory of your choice
Make PHP use this file to validate Block.io's SSL certificate by adding this line to your php.ini:

```
curl.cainfo=c:\path\to\cacert.pem
```

### Usage

[](#usage)

First, sign up for an account at [Block.io](https://block.io/) and take note of your API key under Account &gt; Dashboard.

Download and include the block\_io.php class:

```
require_once 'path/to/block_io.php';
```

Or preferably install via [Composer](https://getcomposer.org/)

```
composer require block_io-php/block_io-php
```

Instantiate the class and set your API key. If the API key is valid the set function will return true otherwise false.

```
$apiKey = "YOUR API KEY FOR DOGECOIN, BITCOIN, OR LITECOIN";
$pin = "YOUR SECRET PIN";
$version = 2; // the API version to use

$block_io = new BlockIo($apiKey, $pin, $version);

echo "Confirmed Balance: " . $block_io->get_balance()->data->available_balance . "\n";
```

The wrapper abstracts all methods listed at  using the same interface names. For example, to get your current account balance:

```
$balance = $block_io->get_balance(array('label' => 'default'));
echo $balance->data->available_balance . "\n";
```

To make requests that require parameters (eg. an address label or address to withdraw to), pass through each parameter in an associative array. For example, the request below will withdraw 50 DOGE to the wallet you specify in place of `WALLET-ADDRESS-HERE`:

```
$withdraw = $block_io->withdraw(array('amount' => '50.0', 'to_address' => 'WALLET-ADDRESS-HERE'));
```

**Note:** This library throws Exceptions when calls fail. Implement try/catch blocks, and retrieve the Exception message to see details.

Please see [Block.io PHP Docs](https://block.io/api/simple/php) for details on available calls.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 91.5% 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.

###  Release Activity

Cadence

Every ~110 days

Recently: every ~60 days

Total

23

Last Release

1904d ago

Major Versions

0.2.1 → 1.0.12014-10-05

PHP version history (4 changes)0.1PHP &gt;=5.2.0

1.0.1PHP &gt;=5.4.0

v1.2.0PHP &gt;=5.6.0

1.3.0PHP &gt;=7.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/315d245e8480aa5b196fe359fad15855c654ee30f77eb7918bc0fbc6b72070e3?d=identicon)[aflorea4](/maintainers/aflorea4)

---

Top Contributors

[![doersf](https://avatars.githubusercontent.com/u/6928955?v=4)](https://github.com/doersf "doersf (75 commits)")[![aflorea4](https://avatars.githubusercontent.com/u/5405865?v=4)](https://github.com/aflorea4 "aflorea4 (3 commits)")[![owenvoke](https://avatars.githubusercontent.com/u/1899334?v=4)](https://github.com/owenvoke "owenvoke (2 commits)")[![nowackipawel](https://avatars.githubusercontent.com/u/8414802?v=4)](https://github.com/nowackipawel "nowackipawel (1 commits)")[![patricklodder](https://avatars.githubusercontent.com/u/1410115?v=4)](https://github.com/patricklodder "patricklodder (1 commits)")

---

Tags

bitcoinlitecoindogecoinblock.ioblock\_io

### Embed Badge

![Health badge](/badges/aflorea4-block-io-php/health.svg)

```
[![Health](https://phpackages.com/badges/aflorea4-block-io-php/health.svg)](https://phpackages.com/packages/aflorea4-block-io-php)
```

###  Alternatives

[block_io-php/block_io-php

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

57118.1k2](/packages/block-io-php-block-io-php)[coingate/coingate-php

CoinGate library for PHP

56459.2k1](/packages/coingate-coingate-php)[plisio/plisio-api-php

155.8k](/packages/plisio-plisio-api-php)

PHPackages © 2026

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