Giter Site home page Giter Site logo

simple-block-explorer's Introduction

Simple Block Explorer

A trivial block explorer written in a single PHP file.

Demo

https://bitcoin.jonasschnelli.ch/explorer/

Features

  • Only requires Bitcoin Core (no additional index)
  • Does UTXO-set lookups
  • Can scan UTXO-set for address balances
  • Can scan blockfilters to create a transaction history of given address

Install

  • Place the index.php script into a php enabled http docs directory
  • Run Bitcoin Core with txindex and blockfilters -txindex -blockfilterindex
  • Edit the index.php config section

Nice links

Use mod_rewrite use a propper URL scheme (/block/), etc. Apache users can place a .htaccess file into the same folder as the PHP script.

RewriteEngine On
RewriteRule ^testnet$ index.php?testnet=1 [L,QSA]
RewriteRule ^testnet/$ index.php?testnet=1 [L,QSA]
RewriteRule ^testnet/tx/([a-fA-F0-9]*)$ index.php?testnet=1&tx=$1 [L,QSA]
RewriteRule ^testnet/tx/([a-fA-F0-9]*)/n/([a-fA-F0-9]*)$ index.php?testnet=1&tx=$1&n=$2 [L,QSA]
RewriteRule ^testnet/block/([a-fA-F0-9]*)$ index.php?testnet=1&block=$1 [L,QSA]
RewriteRule ^testnet/block/([a-fA-F0-9]*)/txid/([a-fA-F0-9]*)$ index.php?testnet=1&block=$1&txid=$2 [L,QSA]
RewriteRule ^testnet/height/([0-9]*)$ index.php?testnet=1&search=$1 [L,QSA]
RewriteRule ^tx/([a-fA-F0-9]*)$ index.php?tx=$1 [L,QSA]
RewriteRule ^tx/([a-fA-F0-9]*)/n/([0-9]*)$ index.php?tx=$1&n=$2 [L,QSA]
RewriteRule ^block/([a-fA-F0-9]*)$ index.php?block=$1 [L,QSA]
RewriteRule ^block/([a-fA-F0-9]*)/txid/([a-fA-F0-9]*)$ index.php?block=$1&txid=$2 [L,QSA]
RewriteRule ^height/([0-9]*)$ index.php?search=$1 [L,QSA]
RewriteRule ^testnet/([a-zA-Z0-9]*)$ index.php?testnet=1&$1=1 [L,QSA]
RewriteRule ^([a-zA-Z0-9]*)$ index.php?$1=1 [L,QSA]

simple-block-explorer's People

Contributors

00uknownuser00 avatar jion avatar jonasschnelli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.