CGIBuffer()

Syntax

*Result = CGIBuffer()
Description
For advanced users. Returns the memory buffer address of the raw CGI input (only useful for POST request type). It can be useful to do extra parsing not supported by this library while still using other commands. The size of the buffer is the value returned by ReadCGI().

Parameters

None.

Return value

Returns the memory buffer address of the raw CGI input, or zero if an error occured.

Example

  If Not InitCGI()
    End
  EndIf
  
  BufferSize = ReadCGI()
  
  WriteCGIHeader(#PB_CGI_HeaderContentType, "text/html", #PB_CGI_LastHeader) ; Write the headers to inform the browser of the content format
  
  WriteCGIString("<html><title>PureBasic - raw buffer</title><body>")  
  If CGIBuffer()
    WriteCGIString("Raw buffer content: <br><pre>" + PeekS(CGIBuffer(), BufferSize, #PB_Ascii) + "</pre>")
  EndIf
  
  WriteCGIString("</body></html>")

See Also

ReadCGI()

Supported OS

All

CGI Index - CGICookieName() ->