Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capture Output of CGI Scripts into a File

Status
Not open for further replies.

AnnaHere

IS-IT--Management
May 16, 2000
17
0
0
AU
Hello Guys,<br>I am experimenting with Socket programming. Wrote code for a Small WebServer serving text/html pages only.<br><br>However would like to be able to run &quot;.cgi&quot; (cgi script) files and capture Output and store into a file.<br><br>Would anybody have an idea of how I could capture the output of a CGI script when run ?<br><br>Anna
 
Dear Anna,<br><br>Your server could open an in/out pipe and pass the out handle to the CGI process as it's stdout. Then you read from the in handle and send the inbound data to the socket.<br><br>-pete
 
Thanks Pete,<br>Good tip, I think using a Pipe is way to go.<br>Not sure how I will pass the out handle to CGI process, but will think about it.<br>Anna
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top