PHP code example of symbol-blockchain-community / symbol-rest-client
1. Go to this page and download the library: Download symbol-blockchain-community/symbol-rest-client 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/ */
symbol-blockchain-community / symbol-rest-client example snippets
apiInstance = new SymbolRestClient\Api\AccountRoutesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$account_id = 'account_id_example'; // string | Account public key or address encoded using a 32-character set.
try {
$result = $apiInstance->getAccountInfo($account_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountRoutesApi->getAccountInfo: ', $e->getMessage(), PHP_EOL;
}