Sziasztok Webmesterek,
Koszonom leveleiteket. Ne legyetek elkeseredve ha meg nem kaptatok
valaszt
mindenkire sor jut.
Sajnos a sorlimit miatt 3 reszben kell elkuldenem az ismertetot.
- Elso resz -
Table of Contents
Overview
HTML Form Data Decoding
Launching the CGI program
CGI Data File
[CGI] Section
[Accept] Section
[System] Section
[Extra Headers] Section
[Form Literal] Section
[Form External] Section
[Form File] Section
[Form Huge] Section
Example of Form Decoding
CGI Results Processing
Overview
A large class of World Wide Web applications are best implemented using
external programs that are controlled by a web server. Examples include
front-ends to business applications which are themselves subject to
frequent changes in business rules. The broad acceptance of
rapid-application development (RAD) tools such as Visual Basic and
Delphi have given rise to the need to use these tools to Web-enable many
kinds of business applications.
HTML Form Data Decoding
There are two ways in which form data may be may be sent by a
browser to the server:
URL-Encoded
This is the most common form data format. The contents
of form fields are "escaped" according to the rules in the HTML 1.0
Specification, then concatenated using unescaped ampersand characters.
This URL-encoded data is sent as a stream to the server, with a content
type of application/x-www-form-urlencoded.
Multipart Form Data
This format has been introduced to permit efficient file uploading
with forms. It may be used without explicitly including a file upload
form field, however. The contents of the form fields are sent as a MIME
multipart message. Each field is contained within a single part. The
content type indicated by the browser is
multipart/form-data.
Launching the CGI program
The server uses the CreateProcess() service to launch the
CGI program. The server maintains synchronization with the CGI program
so it can detect when the CGI program exits.
The server must never use a shell to execute the CGI program. This can
create serious security risks.
NOTE: The CGI program's process handle becomes signalled before
the process rundown is complete. Reliance on rundown to close files,
inherited handles, etc., can cause obscure synchronization problems.
cgi-data-file
The complete path to the <A HREF = "#profile">CGI data file
The CGI data file contains the following sections:
[CGI]
[Accept]
[System]
[Extra Headers]
[Form Literal]
[Form External]
[Form File]
[Form Huge]
The [CGI] Section
This section contains most of the CGI data
items (accept types, content, and extra headers are defined in
separate sections). Each item is provided as a string value. If the
value is an empty string, the keyword is omitted.
The keywords are listed below:
Request Protocol
The name and revision of the information protocol this request came
in with. Format: protocol/revision. Example: "HTTP/1.0".
Request Method
The method with which the request was made. For HTTP, this is "GET",
"HEAD", "POST", etc.
Executable Path
The logical path to the CGI program executable, as needed for
self-referencing URLs. This may vary if the server
supports multi-homing with separate logical path spaces. The server must
provide the physical path equivalent using the logical to physical
mapping for the identity on which the current request was received.
Document Root
The physical path to the logical root "/". This may vary if the
server supports multi-homing with separate logical path spaces. The
server must provide the physical path to the logical root for the
identity on which the current request was received.
Logical Path
A request may specify a path to a resource needed to complete that
request. This path may be in a logical pathname space. This item
contain the pathname exactly as received by the server, without
logical-to-physical translation.
Physical Path
If the request contained logical path information, the server
provides the path in physical form, in the native object (e.g., file)
access syntax of the operating system. This may vary if the server
supports multi-homing with separate logical path spaces. The server must
provide the physical path equivalent using the logical to physical
mapping for the identity on which the current request was received.
Query String
The information which follows the ? in the URL that generated the
request is the "query" information. The server furnishes this to the
back end whenever it is present on the request URL, without any decoding
or translation.
Request Range
Byte-range specification received with request (if any). See the current
Internet Draft (or RFC) describing the byte-range extension to HTTP for
more information. The server must support CGI program participation in
byte-ranging to be compliant with this Specification.
Referer
The URL of the document that contained the link pointing to this CGI
program. Note that in some browsers the implementation of this
is broken, and cannot be relied-on.
From
The e-mail address of the browser user. Note that this is in the
HTTP specification but is not implemented in some browsers due to
privacy concerns.
User Agent
A string description of the client (browser) software. Not generated by
all browsers.
Content Type
For requests which have attached data this is the MIME content type
of that data. Format: type/subtype.
Content Length
For requests which have attached data, this is the length of the
content in bytes.
- Vege az elso resznek -
Mark G. Horvath
E-mail: HorvathM2 @cle.dnet.ge.com
Web server: http://www.Cyber-Dreams.Netopia.com/
|
> 2. Lehet ugy egy szamlalot beilleszteni hogy azt csak te lasd, illetve
> csak te tudd meg mennyit is mutat?
Lehet. A REMOTE_HOST ill. a REMOTE_ADDR kornyezeti valtozok
tartalmazzak, hogy milyen nevu ill. IP-szamu gepen fut az urge
bongeszoje. Ugy kell megirni a szamlaloprogramot, hogy ezek kozul
valamelyiket is figyelje. ((Bar ennek tul sok ertelmet nem latom, mert
a szamlalo allasat nyilvan tarolni kell egy file-ban; egyszerubb azt
nezegetni. Meg a szamlalo amugy is az exhibicionizmusunk kielesere
szolgal. :-) ))
> 3. Ahhoz hogy egy CGI scriptet hasznaljon az ember fia, szuksegvan-e arra
> hogy admin jogokkal rendelkezzen a gepen? Az a gyanum hogy igen.
Nincs szukseg erre. A rendszerkonyvtarakban levo CGI-k olvashatoak es
futtathatoak, ha csak nem valami elborult agyu rendszergazda van.
(Legalabbis gondolom en.) Masreszt sajat CGI-ket is hasznalhat az
ember, ezeket illik a sajat public_html/-bol nyilo cgi-bin/
konyvtarban tartani.
--- Krisz --------------------------------------------------------------
> ------------------------------------------------------------------------
VUCSICS, Krisztian *** * http://www.sch.bme.hu/~krissz
|