示例#1
0
 static function Output($nLogLevel, $strOutput)
 {
     OTAPI_Basic_Output($nLogLevel, $strOutput);
 }
    } else {
        if ($nResult == 1) {
            echo "\n Success in withdraw cash! (Using high-level API in PHP.)\n<br>";
        } else {
            echo "Unexpected return value in withdraw cash.'\n<br>";
        }
    }
}
# ---------------------------------------------------------
# At this point we're done. We've downloaded a public key from
# the OT server, and we've also withdrawn a little cash from the
# server. We've demonstrated that both the high-level and low-level
# OT APIs are operational through PHP.
# So... we're done. Let's shutdown OT and finish execution.
# (Using the low-level API...)
OTAPI_Basic_Output(0, "\nOne more thing: Successfully used OT_API_Output.\n<br>");
OTAPI_Basic_AppShutdown();
# P.S. to see the complete OT high-level API:  OTMadeEasy.h
#  and to see the complete OT low-level  API:  OTAPI_Basic.h
#
# See the Open-Transactions/include/otapi folder for all
# relevant headers. OTMadeEasy is a wrapper for OT_ME, and
# OTAPI_Basic is a wrapper for OTAPI.
#
# One more thing: If you want to see a lot of free sample code
# similar to the above code, which shows you how to use all the
# different OT API function calls, check out this file:
#
#        Open-Transactions/scripts/ot/ot_commands.ot
#
# (It contains the complete implementation for a command-line