PHP code example of gulaandrij / etherscan

1. Go to this page and download the library: Download gulaandrij/etherscan 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/ */

    

gulaandrij / etherscan example snippets


$esApiConnector = new ApiConnector('your_api_key');
$etherScan = new EtherScan($esApiConnector);


$account = $etherScan->getAccount(EtherScan::PREFIX_API);
$startT = microtime(1);
echo $account->getTransactions('0xbb9bc244d798123fde783fcc1c72d3bb8c189413', 1, 25, 'desc') . PHP_EOL;
echo $account->getTransactions('0xbb9bc244d798123fde783fcc1c72d3bb8c189413', 1, 25, 'desc') . PHP_EOL;
echo $account->getTransactions('0xbb9bc244d798123fde783fcc1c72d3bb8c189413', 1, 25, 'desc') . PHP_EOL;
echo $account->getTransactions('0xbb9bc244d798123fde783fcc1c72d3bb8c189413', 1, 25, 'desc') . PHP_EOL;
$endT = microtime(1);


echo "DONE IN: " . ($endT - $startT);