Skip to content

TEZcgi

Easy CGI class.

Declaration

Source position: ezcgi.pp line 34

type

  TEZcgi = class(TObject)
  public
    constructor Create;
    destructor Destroy;
    procedure Run;
    procedure WriteContent;
    procedure PutLine;
    function GetValue : string;
    procedure DoPost;
    procedure DoGet;
    property Values[Index : string]: string; {r}
    property Names[Index : Integer]: string; {r}
    property Variables[Index : Integer]: string; {r}
    property VariableCount: Integer; {r}
    property Name: string; {rw}
    property Email: string; {rw}
  end;

Inheritance

Description

TEZcgi implements all functionality to analyze the CGI environment and query the variables present in it. It's main use is the exposed variables.

Programs wishing to use this class should make a descendent class of this class and override the DoPost or DoGet methods. To run the program, an instance of this class must be created, and it's Run method should be invoked. This will analyze the environment and call the DoPost or DoGet method, depending on what HTTP method was used to invoke the program.

Properties

Member Visibility Description
Email public Email of the server administrator.
Name public Name of the server administrator.
Names read only public Indexed array with available variable names.
Values read only public Variables passed to the CGI script.
VariableCount read only public Number of available variables.
Variables read only public Indexed array with variables as name=value pairs.
See all Properties

Methods

Member Visibility Description
Create public Creates a new instance of the TEZCGI component.
Destroy public Removes the TEZCGI component from memory.
DoGet public Method to handle GET requests.
DoPost public Method to handle POST requests.
GetValue public Return the value of a request variable.
PutLine public Send a line of output to the web-client.
Run public Run the CGI application.
WriteContent public Writes the content type to standard output.
See all Methods