|
GoldMoney - Automated Holding Balance Retrieval | | | | You can automatically retrieve the current metal and currency balances of your Holding (without manually logging into your Holding) by performing the following steps: Write a script or program, for example using PERL, PHP or Visual Basic, that will create text consisting of a single line in the following format (shown here across multiple lines for readability): BAL <TAB> <holding_number> <TAB> <passphrase> <TAB> <reference_number> <NEWLINE> where: - BAL = the name of the service being requested (BAL indicates a balance retrieval);
- <holding_number> = the number of your Holding in the format XX-XX-XX-X;
- <passphrase> = the current passphrase of your Holding;
- <reference_number> = an optional reference number that the GoldMoney system will include in the response;
- <TAB> = the TAB character (ASCII 0x09).
- <NEWLINE> = the newline/linefeed character (ASCII 0x0a).
| Programmatically submit the text, as an HTML form field using the HTTP POST method, to the following URL: https://secure.goldmoney.com/user/auto.php Prior to submission, you must also explicitly set/override the Content-Type field in the HTTP header to application/x-www-form-urlencoded. Various libraries exist that enable you to programmatically send HTTP messages and override HTTP headers, for example cURL (Linux) and MSINET (Microsoft). Depending on which library you use, you may need to explicitly construct the entire HTTP message header in your program (you do not need to do this when using cURL or MSINET). Furthermore, the name of the HTML form field that contains the populated template must be set to either GM_AUTO or to gm_auto. | | Interpret the result that is returned by the GoldMoney system. The output from the service will always be enclosed in a set of <pre> </pre> tags. If any error occurred, the output will contain an error message which will always be prefixed with [ERROR]<TAB>. |
| |