please dont rip this site

Internet Web Server CGI (Common Gateway Interface)

A protocol for http request processing by programs external to the main www server

These programs are most often served from a directly called /cgi-bin/ but

CGI sends most information concerning an http request from the server to the program via OS Environment Variables. The remaining information (usually only used for the POST data transfer method) is sent to the stdin of the program and will be of a length given in the %CONTENT_LENGTH% variable.

Here is an example of the information sent to a CGI program (the Win32AsmCGI program)

%SERVER_SOFTWARE% = Microsoft-IIS/4.0
%SERVER_NAME% = 192.168.0.5
%GATEWAY_INTERFACE% = CGI/1.1
%SERVER_PROTOCOL% = HTTP/1.1
%SERVER_PORT% = 80
%REQUEST_METHOD% = POST
%PATH_TRANSLATED% = h:\Inetpub\wwwroot
%SCRIPT_NAME% = /cgi-bin/asmcgi.exe
%QUERY_STRING% = get=still
%REMOTE_HOST% = 192.168.0.6
%REMOTE_ADDR% = 192.168.0.6
%CONTENT_TYPE% = application/x-www-form-urlencoded
%CONTENT_LENGTH% = 47
%HTTP_ACCEPT% = application/msword, application/vnd.ms-excel, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
%HTTP_USER_AGENT% = Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)

Output from the script is returned to stdout and in order to tell the server what kind of document you are sending back, whether it be a full document or a reference to one, CGI requires you to place a short header on your output. This header is ASCII text, consisting of lines separated by either linefeeds or carriage returns (or both) followed by a single blank line. The output body then follows in whatever native format.

For example, to send back HTML to the client, your output should read:

Content-type: text/html

<HTML><HEAD>
<TITLE>output of HTML from CGI script</TITLE>
</HEAD><BODY>
<H1>Sample output</H1>
What do you think of <STRONG>this?</STRONG>
</BODY></HTML>

Also:


file: /Techref/inet/cgi.htm, 2KB, , updated: 2001/6/21 12:36, local time: 2017/10/19 04:12,
TOP NEW HELP FIND: 
54.162.152.232:LOG IN

 ©2017 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE! / 

<A HREF="http://www.piclist.com/techref/inet/cgi.htm"> Internet Web Server CGI</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

  PICList 2017 contributors:
o List host: MIT, Site host massmind.org, Top posters @20171019 RussellMc, Van Horn, David, James Cameron, Sean Breheny, IVP, alan.b.pearce, Neil, David C Brown, Bob Blick, Denny Esterline,
* Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
 

Welcome to www.piclist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .