PHP code example of baumann-at / php-polygonscan-api

1. Go to this page and download the library: Download baumann-at/php-polygonscan-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/ */

    

baumann-at / php-polygonscan-api example snippets


$client = new \Polygonscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V');
$client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');

$client = new \Polygonscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V', PolygonscanAPIConf::TESTNET_MUMBAI);
$client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');