CGI C and HTML
From: Sergio (emsrome_at_libero.it)
Date: 12/27/03
- Next message: Martin Ambuhl: "Re: CGI C and HTML"
- Previous message: Richard Heathfield: "Re: looking for good C source code"
- Next in thread: Martin Ambuhl: "Re: CGI C and HTML"
- Reply: Martin Ambuhl: "Re: CGI C and HTML"
- Reply: Richard Heathfield: "Re: CGI C and HTML"
- Reply: Sean Kenwrick: "Re: CGI C and HTML"
- Reply: Keith Thompson: "Re: CGI C and HTML"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Dec 2003 00:59:08 -0800
Merry Christmas to You all.
My system: WIN XP, DEV CPP 4.x(C compiler).
Consider this HTML code.
<HTML>
<BODY>
<FORM NAME="MyForm" ACTION="c:\PATH\MyProgram.exe" METHOD="GET"
ENCTYPE="application/x-www-form-urlencoded">
<INPUT TYPE="TEXT" NAME="MyString">
<INPUT TYPE="SUBMIT" NAME="Iaccept" VALUE="OK">
</FORM>
</BODY>
</HTML>
This code should have to produce a string("MyForm") and on SUBMIT,
this should be sent to MyProgram.exe to be processed.
Consider this C code.
#include <stdio.h>
void main(int argc, char *argv[]){
/* Your code */
char *MyForm;
FILE *filePtr;
filePtr=fopen("c:\\PATH\\MyText.txt","w");
fprintf(filePtr,"%s",MyForm);
return NULL;
}
The above C code should have to capture the HTML contents and to put
it into MyText.txt.
Does't interest to tokenize and to unescape the string.
I need to understand the mechanism of CGI C(pure ANSI C, better
unstructured).
Particularly, how could I capture by a C program a string comes from
another program.
For example, on command line by argv[], I can pass a string to the
program; unfortunately this procedure doesn't run between two
programs. Better I'm not able to exchange a string between programs,
without using any disk, only from RAM.
Greetings from Italy
Sergio
- Next message: Martin Ambuhl: "Re: CGI C and HTML"
- Previous message: Richard Heathfield: "Re: looking for good C source code"
- Next in thread: Martin Ambuhl: "Re: CGI C and HTML"
- Reply: Martin Ambuhl: "Re: CGI C and HTML"
- Reply: Richard Heathfield: "Re: CGI C and HTML"
- Reply: Sean Kenwrick: "Re: CGI C and HTML"
- Reply: Keith Thompson: "Re: CGI C and HTML"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|