PHP code example of block-chen / blocksdk-php

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

    

block-chen / blocksdk-php example snippets



use BlockSDK;

$blockSDK = new BlockSDK("YOU_TOKEN");
$ethereumClient = $blockSDK->createEthereum();

//or

$ethereumClient = BlockSDK::createEthereum("YOU_TOKEN");


use BlockSDK;

$blockSDK = new BlockSDK("YOU_TOKEN","https://mainnet-api.blocksdk.com");
$ethereumClient = $blockSDK->createEthereum();

//or

$ethereumClient = BlockSDK::createEthereum("YOU_TOKEN","https://mainnet-api.blocksdk.com");


$nfts = $ethereumClient->GetSingleNfts([
    "contract_address" => "0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b",
    "


$address = $ethereumClient->CreateAddress([
    "name" => "test"
]);

   composer