[Gllug] C Code in CGI

Peter Childs blue.dragon at blueyonder.co.uk
Mon Jan 31 07:24:30 UTC 2005


Jack Richards wrote:

>Thought I'd run this by the group, just in case.... 
> 
>Does anybody know a a stub of code that I can use in C, as a cgi script to 
>upload a file to a server, without using CGL or any other library/language. 
> 
>Its got to be C since I'm using UcLibc environment and I have no space for 
>more libraries or other such stuff.  In another life, perl would be fine, but 
>I don;t have space for perl enterpeter. 
> 
>Cheers, 
> 
>Jack 
>  
>

    Long time since I last delt with pure CGI, but I seam to remeber all 
the data and url arriving in the form of environment varibles with the 
cgi script, So all your C program would have to do is read thouse 
envirnment varibles and produce its output on stdout. I beleve some of 
the data may arrive on the stdin.
    Should be as easy to write a program in C without any libraries as 
it is to write the program in perl without using any standard libraries.

Peter Childs
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list