- PHP 7.1
- PHP with curl and socket
- Make sure that the go-nekonium is already synced to network if you are using lib on mainnet. Because it takes some time to sync.
- download lib
- make dir named 'PHPNekonium' or something
- put all files there from zipped lib except for .gitignore and Test.php
- Run go-nekonium, if you want connect with RPC, then enable it (NOTE:personal_unlockAccount() cannot be called from RPC by default)
- Run PHP 7.1 and web server
- Write down your test.php like below
- Open it with your favorite browser
- YAY
<?php
require_once 'PHPNekonium\NekoniumRPC.php';
use kabayaki\PHPNekonium as Gnek;
$gnek = new Gnek\NekoniumRPC("localhost", 8293);
$result = $nek->eth_blockNumber();
echo $result;
?>