Giter Club home page Giter Club logo

altcoin-bitcoin-explorer's Introduction

Altcoin/Bitcoin Data Explorer

Build Status SensioLabs Insight License Latest Stable Version

PHP Altcoin/Bitcoin data Explorer

This package can get transaction information with Bitcoin protocol.

It can send HTTP requests to a Bitcoin peer server to perform several operations.

Currently it can get transaction details, get peer information, get mining information, get network hashes, get block chains, etc..

Installation

You can install this library by using [Composer]. You can also view more info about this on [Packagist].

Add this to the require section in your composer.json file.

{
    "require": {
        "arzzen/altcoin-bitcoin-explorer": "1.1.*"
    }
}

Usage

Information about network:

# Get information from network 
use BlockExplorer\NetworkInfo;
$network = new NetworkInfo($ip, $port, $username, $password);

# Get information about the wallets network and block chain
$networkInfo = $network->getInfo();
print_r($networkInfo);

# Get data about each connected node
$peerInfo = $network->getPeerInfo();
print_r($peerInfo);

# Get calculated network hash rate for the latest block
$latestHash = $network->getNetworkHashForLatestBlock();
print_r($latestHash);

Information about transactions:

# Fetch transactions information
use BlockExplorer\Transaction;
$transaction = new Transaction($ip, $port, $username, $password);

$transactionInfo = $transaction->getTransaction('51b78168d94ec307e2855697209275d477e05d8647caf29cb9e38fb6a4661145');
print_r($transactionInfo);

Information from block chain:

# Get information from blockchain
use BlockExplorer\BlockChain;
$block = new BlockChain($ip, $port, $username, $password);

$blockInfoFromHash = $block->getBlock('000000000000000007c4695c756bb944cf31f1f20487a32375d9d4c61dfd6349');
print_r($blockInfoFromHash);

$blockInfoFromHeight = $block->getBlockHash('308788');
print_r($blockInfoFromHeight);

Award

Class won "PHP Programming Innovation Award" on phpclasses.org (August 2014). Link.

altcoin-bitcoin-explorer's People

Contributors

arzzen avatar

Watchers

James Cloos avatar QUASI avatar

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.