CGI/FCGI --  Functions for using CGI or FCGI technology of WEB-servers.


lAccepted           FCGI_ACCEPT()
NIL                 FCGI_FLUSH()
mapEnv              FCGI_GETENV(<cName>) --> cValue FCGI_GETENV()
cStdInData          FCGI_READ()


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

Function FCGI_ACCEPT()

 FCGI_ACCEPT() --> lAccepted

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.

Function FCGI_FLUSH()


Flush all buffered data to FCGI server peer.

Function FCGI_GETENV()

 FCGI_GETENV(<cName>) --> cValue
 FCGI_GETENV() --> mapEnv

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.

Function FCGI_READ()

 FCGI_READ() --> cStdInData

This function read exactly CONTENT_LENGTH bytes, where CONTENT_LENGTH is a number, supplied by HTTP client