PHP code example of numairawan / ethplorer-api-php
1. Go to this page and download the library: Download numairawan/ethplorer-api-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
numairawan / ethplorer-api-php example snippets
use NumairAwan\EthplorerApi\EthplorerApi;
// Example usage:
$apiKeys = ["YOUR_API_KEY_1", "YOUR_API_KEY_2"];
// By default it will use sequential mode with multi-keys for each request
// pass 'true' in 2nd parameter to use random api for each request.
// new EthplorerApi($apiKeys, true);
$ethplorer = new EthplorerApi($apiKeys);
// Fetch last block data
$lastBlockData = $ethplorer->getLastBlock();
var_dump($lastBlockData);
bash
composer