ReadCGI()

Syntax

Result = ReadCGI()
Description
Reads the CGI request input. InitCGI() has to be called succesfully before trying to the read the CGI input.

Parameters

None.

Return value

Returns non-zero if the CGI request has been successfully read. If the request was to big or another error occured, zero is returned and the CGI program should be ended.

Example

  If Not InitCGI() Or Not ReadCGI()
    End
  EndIf
  
  WriteCGIHeader(#PB_CGI_HeaderContentType, "text/html", #PB_CGI_LastHeader) ; Write the headers to inform the browser of the content format
  
  WriteCGIString("<html><title>PureBasic - variables</title><body>" +
                 "Hello from PureBasic CGI !" +
                 "</body></html>")

See Also

InitCGI()

Supported OS

All

<- InitFastCGI() - CGI Index - WaitFastCGIRequest() ->