Code Monkey home page Code Monkey logo

php-bitcoin-api's Introduction

phramz/php-bitcoin-api Build Status

This is (or will be) a full-blown implementation of the bitcoind JSON-RPC API written in PHP. Please be aware that this is still early alpha! Not all features are implemented yet and the interfaces are not stable. Anyways ... the basic features should already work as expected ;-)

Install

It's easy if you use composer!

edit your composer.json

"require": {
    "phramz/php-bitcoin-api": "dev-master"
}

or via command line

php composer.phar require phramz/php-bitcoin-api

License

This library is licensed under the MIT license. For further information see LICENSE file.

Examples

<?php

use Phramz\Bitcoin\Api\Connection\BuzzConnection;
use Phramz\Bitcoin\Api\BitcoindClient;
use Buzz\Browser;

// setup a connection
$connection = new BuzzConnection(new Browser(), '192.168.56.1', '8333', 'username123', 'password123');

// setup the client
$bitcoinClient = new BitcoindClient($connection);

echo "current balance:  " . $bitcoinClient->getBalance() . PHP_EOL;
echo "number of blocks: " . $bitcoinClient->getBlockCount() . PHP_EOL;

That's it! I hope this peace of software will be helpful! ... if you think it is ... feel free to donate some of your Bitcoins to keep the development going ;-)

echo "transaction id: ". $bitcoinClient->sendToAddress('1JGNmDQVjk7T4S1pcvdDsPJsFuQuZcMDe8', 0.01, 'donation');

Have fun!

php-bitcoin-api's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mhaendel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.