PHP code example of ivanhoe / ivanhoe-sdk

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

    

ivanhoe / ivanhoe-sdk example snippets

 php
$httpClient = new \Ivanhoe\SDK\CurlClient();
$sessionResource = new Ivanhoe\SDK\SessionResource($httpClient);

$subId = $sessionResource->setCredentials(['id', 'password'])
    ->getSubId();
 php
$httpClient = new \Ivanhoe\SDK\CurlClient();
$httpClient->setOpts([
    CURLOPT_FRESH_CONNECT => true
]);