PHP code example of w3spi5 / php-bscscan-api
1. Go to this page and download the library: Download w3spi5/php-bscscan-api 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/ */
w3spi5 / php-bscscan-api example snippets
$client = new \Bscscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V');
$client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');
$client = new \Bscscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V', BscscanAPIConf::TESTNET);
$client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');
composer