PHP wrapper for the Bscscan API
The minimum requirement by Bscscan API is that your Web server supports PHP 5.6.
To install Bscscan PHP API package you can run command:
composer require w3spi5/php-bscscan-api:dev-master
Mainnet
$client = new \Bscscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V');
$client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');
Supported:
- Testnet
$client = new \Bscscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V', BscscanAPIConf::TESTNET);
$client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');
This package was adapted from Maslakou Ihar's excellent package called php-etherscan-api (that I contributed to). Despite all the care taken, it is possible that there are errors due to the copy of the code. Feel free to submit a pull request if needed.