WaitFastCGIRequest()
Syntax
Result = WaitFastCGIRequest()Description
Waits for a new incoming request. This command will halt the program execution until a new request is available. InitFastCGI() needs to be called successfully before using this command.
Parameters
None.
Return value
Returns non-zero if a new request has been processed.
Example
If Not InitCGI()
End
EndIf
If Not InitFastCGI(5600) ; Create the FastCGI program on port 5600
End
EndIf
While WaitFastCGIRequest()
If 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 - FastCGI</title><body>" +
"Hello from PureBasic FastCGI !<br>" +
"Actual time: <b>"+FormatDate("%hh:%ii", Date()) + "</b>" +
"</body></html>")
EndIf
Wend
See Also
InitCGI(), InitFastCGI(), FinishFastCGIRequest()
Supported OS
All