File: capture.c

package info (click to toggle)
libcgic 1.05-6
  • links: PTS
  • area: non-free
  • in suites: hamm
  • size: 264 kB
  • ctags: 193
  • sloc: ansic: 1,222; makefile: 80
file content (15 lines) | stat: -rw-r--r-- 438 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "cgic.h"

int cgiMain() {
	char fname[127];
	sprintf(fname, "/tmp/cgic-%d.dat", getpid());
	cgiWriteEnvironment(fname);
	cgiHeaderContentType("text/html");
	fprintf(cgiOut, "<title>Captured</title>\n");
	fprintf(cgiOut, "<h1>Captured</h1>\n");
	fprintf(cgiOut, "Your form submission was captured for use in\n");
	fprintf(cgiOut, "debugging CGI code.\n");
	fprintf(cgiOut, "<br>It was saved as the file %s", fname);
	return 0;
}