freeCGI++ Class Hierarchy v2.4
==============================
http://www.achacha.org/freeCGI


The library is provided with an implied GNU license, it is
free to change, distribute, use for profit, etc.



Many samples are provided, and  should help you to get
started.  You should be able to program in C++ to some
degree, as the code is very general and specific functionality
may require you to extend the object model.  freeCGI++ is
intended as a useful set of classes to get you started with
writing CGIs without having to do it all from skratch.



FOR RELEASE BUILDS:
  Comment out DEBUGOPTIONS= line by inserting a # in front of it
  Add whatever level of optimization you feel is necessary and safe (this varies between systems)




Also provided are 4 makefiles:
freeCGI.dsw - Visual C++ 6.x
makefile.linux.gcc - Linux makefile
makefile.solaris.sunc - Solaris makefile
makefile.hpux.aCC - HP-UX makefile
makefile.i586-sco-sysv5uw710 - SCO Unix makefile

/doc
--Contains helpful documents collected from the web
--HTML working references
--CGI standard: RFC1945
--CGI variables and their uses
--URL specifications
--Cookie specification and RFC
--HTTP RFCs
--and some others

/htmlhelp
--The on-line help system in HTML
--Just open index.htm into your browser

/include
--All the include files necessary.  a_acgi.h is the only one that is
  included in your C++ code.

/samples/apps
--Some useful app-type samples
/samples/test
--Some MFC samples
/samples/test
--Some debugging and testing samples

/src
--Source code for the C++ objects

Useful Samples
===================
/Apps
-----
html_ex.cpp 
 - Dynamic HTML generation
cgi_ex.cpp 
 - Form submission variable parser (call from an HTML form)
form_ex.cpp 
 - Shows basic FORM processing (creates a form and then parses submission)
ShopCart.cpp
 - Basic shopping cart skeleton easy to customize
AMessage.cpp
 - Fully function CGI messageboard/guestbook
ABanner.cpp
 - Basic skeleton for banner rotation (outputs some inlined IMAGE/GIF)
SampleCGI.cpp
 - Simple "Hello World" CGI
multipart_ex.cpp
 - Example CGI to support multi-part submissions
variables.vpp
 - Displays a debug dump of the submitted and avaialable CGI variables (meant for testing form submits and such)
variables_WAP.vpp
 - Same as variables.cpp, except the output is a WAP compatible XML format

/MFC
----
mfcthrd.cpp
 - MFC multi-threaded example
   Remember to use the MultiThreaded LIB (or DLL) in the project settings.


Some samples for testing functionality
=================================
/test
-----
cookie.cpp
 - HTTP cookie test.
CRC.cpp
 - Using CRC.
crypto.cpp
 - Encryption and encoding.
elems.cpp
 - Continers and element pair lists.
eplist.cpp
 - More element pair lists.
lists.cpp
 - Yet more lists
random.cpp
 - Random number generator sample
rngcrypt.cpp
 - Shows how to use a One-Time Pad for encryption.
state.cpp
 - How to maintain secure state variables.
url.cpp
 - Tests parsing of a URL.
validate.cpp
 - Different routines in freeCGI used for validation.


Alternate UNIX shell script to compile you CGI (assuming g++ compiler)
======================================================================
g++ ~/freeCGI/src/*.cpp ~/freeCGI/samples/apps/$1.cpp -I ~/freeCGI/include -O2 -o $1.cgi 
strip $1.cgi

(
  You can figure the rest out, the code is ANSI compliant and requires little to make
  it run on any other platform that supports ANSI C++
)


Windows NT compilation (if not using the provided makefiles)
============================================================
1. Create a 32-bit console project
2. Add project search path to {freeCGI path}/include directory
3. Add .cpp filed from either {freeCGI path}/src or {mypath}/src_rtti
5. Add your source file (or a sample)
6. Build and debug

NOTES on Microsoft Visual C++
 Sometimes a console project is created with LIBC.LIB/LIBCI.LIB missing.
 You will get LNK2001 error for iostream objects.  To fix it just add
 LIBCD.LIB and LIBCID.LIB to debug project library list and
 LIBC.LIB and LIBCI.LIB to the release library.

Change history:
2.4.03
  List remove bug fix, thanks to John Loemban Tobing
  Cleaned up and documented AMessage sample
  Added support for arbitrary mime type
  Added samples/Apps for variable dumps in HTML and WAP based WML
  \r\n is consistent with HTTP RFC
2.4.02
  Ported to SCO Unix thanks to Allan Clark of SCO
2.4.01
  Ported to SunC 5.0 and templated stream classes
2.4.00
  Ported from ACGI++ and ported to HPUX
