Programming Reference Manual
 
Syntax
 
HtmGetProfile(prm%)
 
Description
Returns a string value, parsed from the webserver request through the CGI interface, as specified by the prm% parameter-id. Listed below are the valid ID’s.
 
PLEASE NOTE: When a new CCL-procedure is build from a html document, all parameter id’s can optionally be inserted as global constants in your source.
 
Parameter
Description
prm%
Reference to a system profile, as listed below:
 
 
values
Description
1
ServerSoftware: Name and version of the information server software answering the request (and running the CGI program). Format: name/version.
2
ServerName: The network host name or alias of the server, as needed for self-referencing URLs. This (in combination with the ServerPort) could be used tu manufacture a full URL to the server, for URL fixups. This may vary if the server supports multi-homing. The value of this item must be the host name on which the currenct request was received.
3
RequestProtocol: Returns the name and revision of the information protocol this request come in with. Format: protocol/revision. Example HTTP/1.0.
4
ServerAdmin: The e-mail address of the servers administrator. This is used in error messages, and might be used to send MAPI mail to the administrator, or to form mailto: URLs in generated documents.
5
Version: The revision of the CGI specification to which this server complies. Format: CGI/revision. Example: winCGI/1.3a
6
RequestMethod: The method with which the request was made. For HTTP, this is GET, HEAD, POST, etc.
7
RequestKeepAlive: This should always be Yes.
8
LogicalPath: A request may specify a path to a resource needed to complete that request. This path may be in a logical pathname space. This item contains the pathname exactly as received by the server, without logical-to-physical translation.
9
PhysicalPath: If the request contained logical path information, the server provides provides the path in physical form, in the native object (e.g., file) access syntax of the operating system. This may vary if the server supports multi-homing with separate logical path spaces. The server must provide the physical path equivalent using the logical-to-physical mapping for the identity on which the current request was received.
10
ExecutablePath: The logical path to the CGI program executable (HTML-CCL.EXE), as needed for self-referencing URLs. This may vary if the server supports multi-homing with separate logical path spaces. The server must provide the physical path equivalent using the logical-to-physical mapping for the identity on which the current request was received.
11
QueryString: The information which follows the ? in the URL that generated the request is the query information. The server furnishes this to the back end whenever it is present on the request URL, without any decoding or translation.
12
RemoteHost: The netowrk host name of the client (requestor) system, if available. This item is used for logging.
13
RemoteAddr: The network (IP) address of the client (requestor) system. This item is used for logging if the host name is not available.
14
RequestRange: Byte-range specification received with request (if any). See the current Internet Draft (or RFC) describing the byte-range extension to HTTP for more information. The server must support CGI program participation in byte-ranging to be compliant with this specification.
15
Referrer: The URL of the document that contained the link pointing to the HTLM-CCL CGI program. Note that in some browsers the implementation of this is broken, and cannot be relied on.
16
From: The e-mail address of the browser user. Not that this is in the HTTP specification but is not implemented in some browsers due to privacy concerns.
17
UserAgent: A string description of the client (browser) software. Not generated by all browsers.
18
AuthUser: The username (in the indicated realm) that the client used to attempt authentication, as specified in the request. If present in the request, the server must provide this whether or not is was used by the server for authentication.
19
AuthPass: The password that the client used to attempt authentication, as specified in the request. If present in the request, the server must provide this whether or not it was used by the server for authentication. NOTE - Current practice on the OReilly WebSite servers require that the CGI programs name begin with a dollar sign ($) to have the password supplied through the CGI interface. This is not required by this specification. It is recommended, however, as it forces the CGI programmer to do something special to have the password info exported from within the servers internal environment.
20
AuthRealm: The method-specific authentication realm specified in the request. If precent, the server must provide this whether or not it was used by the server for authentication.
21
AuthType: The protocol-specific authentication method specified in the request. If precent, this is normally Basic. The server must provide this whether or not it was used by the server for authentication.
22
ContentType: For requests which have attached data this is the MIME content type of that data. Format: type/subtype.
23
ContentLength: For requests which have attached data, this is the length of the content in bytes.
24
ServerPort: The network port number on which the server is listening. This is also needed for self-referencing URLs.
25
ContentFile: For requests which have attached data, the server makes the data available to the CGI program by putting it into this file. The value of this item is the complete pathname of that file.
26
OutputFile: The full path.name of the file that contains the content (if any) to receive the CGI programs results. This is where all TrmPrint statements send their output to.
27
GMTOffset: The number of seconds to be added to GMT time to reach local time. For Pacific Standard time, this number is -28,800. Useful for computing GMT times.
28
DebugMode: This is No unless the servers CGI/script tracing mode is enabled, then it is Yes. Useful for providing conditional tracing within the CCL procedures.
 
See Also
Example
 
Sub Main
TrmSetInterface "HTML"
TrmPrint "Content-type: text/html"
TrmPrint ""
TrmPrint "<HTML>"
TrmPrint "<BODY>"
TrmPring "You IP has been logged: " & _
HtmGetProfile(13)
TrmPrint "</BODY>"
TrmPrint "</HTML>"
End Sub