www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/18/05:25:12

Message-ID: <3679EB62.3F5C9A65@codenet.net>
Date: Thu, 17 Dec 1998 22:42:58 -0700
From: Steve Patton <spatton AT codenet DOT net>
X-Mailer: Mozilla 4.5 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: CGI / Common Gateway Interface
References: <3675FAB4 DOT 918BEB88 AT codenet DOT net> <368994ac DOT 1257740 AT 158 DOT 152 DOT 254 DOT 70>
NNTP-Posting-Host: 209.136.121.124
X-Trace: 17 Dec 1998 22:45:50 -0700, 209.136.121.124
Lines: 38
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019