Category CGI/FCGI include description of functions for
using CGI or FCGI technology of WEB-servers.
For using need linking clip-fcgi library:
clip -e test.prg -lclip-fcgi
FCGI_ACCEPT() | Accept FCGI connecton from server peer. |
FCGI_FLUSH() | Flush all buffered data to FCGI server peer. |
FCGI_GETENV() | Return value of environment variable, or map all variables as name/value pairs. |
FCGI_READ() | Read output of WWW server, passed via FCGI protocol. |
lAccepted := FCGI_ACCEPT()
No arguments
Returns NIL.
When the connection is accepted, all steram output (via ? or QOUT() or similar functions will be redirected to server. The output is buffered; you can use function FCGI_FLUSH() to explicitly flush output buffers.
Note that real end of transaction happens when you again call FCGI_ACCEPT(), this corresponds to termination of CGI program.
ITK,Paul
No dependies of platform.
FCGI_FLUSH()
No arguments
Returns NIL.
Flush all buffered data to FCGI server peer.
ITK,Paul
No dependies of platform.
cValue := FCGI_GETENV(<cName>) mapEnv := FCGI_GETENV()
Return value of environment variable, or map all variables as name/value pairs.
When the connection is accepted, WWW server sends some environment variables (well-known in CGI programming) via FCGI protocol. The function FCGI_GETENV() give access to this variables.
ITK,Paul
No dependies of platform.
cStdInData := FCGI_READ()
No arguments
Data from StdIn.
This function read exactly CONTENT_LENGTH bytes, where CONTENT_LENGTH is a number, supplied by HTTP client
ITK,Paul
No dependies of platform.