DKW HTTP Extension Library for Delphi 2.0
-----------------------------------------

1. BACKGROUND

  CGI is a common technology for allowing the contents of a web
  page to be created dynaically, by a program, rather than stored
  as a static file.  When a CGI web page needs to be displayed, the
  web server runs a CGI executable and captures its output, sending
  it to the client as HTML, or a GIF or any other format supported
  by the browser.

  ISAPI was developed by Microsoft and its partners as an alternative
  to CGI.  Rather than spawning an executable every time a request is
  made, an ISAPI DLL is loaded once and called on an as-needed basis.
  ISAPI is much more efficient but provides the same basic services.
  The drawback is that an ill-behaved ISAPI extension can crash the
  web server itself.

  The DKW HTTP Extension Library for Delphi 2.0 provides a framework
  for developing extensions that can be compiled as either CGI or ISAPI
  with no modiciations to the code.  Using this technique an extension
  can be developed and tested using CGI, which is safer and supported
  by more servers, and then deployed using ISAPI where appropriate.

2. FILES

  This library consists of the following files:

    CGI.DPR     - CGI project
    CGI.DOF     - CGI project options
    ISAPI.DPR   - ISAPI project
    ISAPI.DOF   - ISAPI project options
    HTTPExt.PAS - ISAPI definitions (supplied by Borland)
    DKWHTTP.PAS - DKW-defined classes for CGI and ISAPI support

  The WebCounter demonstration provided consists of the following
  additional files:

    Counter.PAS  - The Web counter HTTP extension
    GifUtils.PAS - GIF encoding utilities used by Counter.PAS

  A stub extension is provided:

    WebAddon.PAS - Sample file for creating new HTTP extensions


3. DEMO BUILD INSTRUCTIONS

  Open each of the two projects in turn (CGI and ISAPI) and select
  "build all" from the project menu.  Using a simple "build" will
  not work correctly on the second project since they share the
  Counter.PAS file and conditional compilation causes it to compile
  slightly differently in the two projects.

  The resulting CGI.EXE and ISAPI.DLL files can be installed and used
  on any compliant Web server.


4. DEMO USAGE INSTRUCTIONS

  You will need to understand how to install a CGI or ISAPI extension on
  your web server.  Once installed, including the following reference in
  an HTML document should demonstrate the web counter:

  <IMG SRC="/scripts/CGI.EXE?test"> 
  
  or

  <IMG SRC="/scripts/ISAPI.DLL?test"> 

  ... the former for CGI, the latter for ISAPI.  This assumes that you
  have placed the .EXE or .DLL in a directory called "scripts."


5. WRITING YOUR OWN EXTENSIONS

  Step 1: Make a copy of the entire demo library except Counter.PAS and
          GifUtils.PAS.

  Step 2: Edit CGI.dpr and ISAPI.dpr and change the references to
          Counter.PAS to WebAddon.PAS, and from TWebCounter to TWebAddon.

  Step 3: Modify WebAddon.PAS to do something useful.  

  Step 4: Compile and go!


6. CONTACTING DKW

  You can contact Blake Stone at DKW Systems Corporation:

  Phone: (403) 264-6200 x232
  Email: bstone@dkw.com
  Web: http://www.dkw.com/bstone
