Mail Archives: djgpp/1998/12/18/05:25:12
I tried to do something like that, unfortunately it tried to initiate a
download. And the server I'm using is Apache (for Win32) and is on an internal
proxie. Even have my own DNS entry. But like I said, it tried to have me
download xxxx.exe (keeing in reference to your example). Do I need to rename
the .EXE to something like xxxx.cgi? Thanks!
"Sam." wrote:
> This is all down to your web server. For starters, the URL will
> probably be http://whatever/blah/blah/xxxx.exe
>
> CGI works by the server setting environment variables, HTTP_QUERY,
> HTTP_COOKIE, and possibly a couple more, then calling your program.
> Your program must read these, then print the results to standard
> output (ie, printf). The web server will take the standard output and
> feed it to the viewer's browser, more or less unaltered. This means
> you can include HTTP headers in your output, as well as HTML.
>
> So all you need be able to do is read environment variables, and
> output to stdout, beginner stuff.
>
> The details depend on your web server, which obviously must be running
> DOS or Windows or whatever so it can run DJGPP binaries. One I
> downloaded ran in Windows and would call your DOS programs from a BAT
> file. This is probably not the most efficient way of doing things, but
> for the purposes of trying it out, look for a free personal web server
> on TUCOWS and read the docs that come with it. They'll tell you how
> it's CGI works. Then start the server, and connect to your own
> computer (127.0.0.1) with Netscape. You can even connect via proxies
> halfway across the Internet, and get friends to try it out for you.
> It's pretty easy, actually, give yourself a few hours.
>
> ------------------------------------------------------------------------
>
> The person who said he was a crap presenter knows nothing because compared
> to the outwardly camp stuart miles, speech impediment Katy Hill and nothing
> upstairs Konnie Huq, he was a true professional. Heh heh heh.
- Raw text -