S
Sergio
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
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