Example #1
0
 static function GetServer_ID($nIndex)
 {
     return OTAPI_Basic_GetServer_ID($nIndex);
 }
if (!$bSuccess) {
    $s_theCaller = null;
    $s_theCallback = null;
    //LoadState.setStageFailed();
    echo "OneTimeOnly.GiveItAShot(): ERROR: Failure instantiating caller or callback objects.";
}
echo "SUCCESS setting the password callback.<br>";
OTAPI_Basic_LoadWallet();
// -----------------------------------------
# Use the low-level API to see how many server contracts
# are in the user's wallet.
$count = OTAPI_Basic_GetServerCount();
echo "Server count: " . $count . "<br>";
for ($i = 0; $i < $count; $i++) {
    //$srvID = OTAPI_Basic_GetServer_ID($i);
    $srvID = OTAPI_Basic_GetServer_ID($i);
    echo "Server Id : " . $srvID . '&nbsp;&nbsp;&nbsp;';
    $server_name = OTAPI_Basic_GetServer_Name($srvID);
    echo $server_name . '<br>';
}
$nym_cnt = OTAPI_Basic_GetNymCount();
echo 'nym count = ' . $nym_cnt . '<br>';
for ($i = 0; $i < $nym_cnt; $i++) {
    $nymID = OTAPI_Basic_GetNym_ID($i);
    echo "Nym Id : " . $nymID . '&nbsp;&nbsp;&nbsp;&nbsp;';
    $nym_name = OTAPI_Basic_GetNym_Name($nymID);
    echo $nym_name . '<br>';
}
// -----------------------------------------
# OT MADE EASY  (high-level API)
#