------
CGI4VB
------
 * CGI interface written in Visual Basic 4 (32-bit).
 * Will work with any standard 32-bit web server
 * Does not require  a winHttpd-compliant server. 
 * Uses STDIN and STDOUT to communicate between server and cgi program.
 * Does not use temp files
 * Supports both the POST and the GET methods 
 
I assume that you have a working knowledge of CGI and VB...

To test CGI4VB:

1. open a new project in VB4 - 32bit
2. remove Form1 from the project
3. remove all custom controls - select Tools...Custom Controls
4. add CGI4VB.BAS and SAMPLE.BAS to the project
5. select Tools...Options...Project and set Startup form to Sub Main
6. create CGI4VB.EXE, and put it in your server's CGI-BIN directory
7. Test by using CGI4VB.HTM

To create your own CGI programs, replace SAMPLE.BAS with your own routine.
-------------------------------------------------------------------------
			PROBLEMS?

If you have problems, please 
	read the enclosed "Problems.txt"
	make an effort to solve it yourself
        read the comments in the source code

If all else fails, feel free to contact me, but include:
        a description of the problem and any error messages
	version of CGI4VB that you're using
	http server and version
	browser and version
	steps you've already taken to try to resolve the problem
 
-------------------------------------------------------------------------

Sample files include:
---------------------
CGI4VB.BAS   - the engine    - needed by all programs
CGI4rtn.BAS  - routines      - string handling, etc.
CGI4env.BAS  - env variables - displays the server's environment variables
CGI4cntr.BAS - page counter  - execute from an <IMG> tag  
CGI4time.BAS - digital clock - execute from an <IMG> tag    
CGI4red.BAS  - redirection   - using the Location: header
CGI4upld.BAS - file upload   - multipart headers (for newer browsers)
SAMPLE.BAS   - sample program  try this first

*.htm        - HTML pages for above programs

---------------------
Notes on version 1.3
---------------------
Query strings can be used in addition to posted data, instead of either/or. 
Posted data is checked for content-type before attempting to decode it.
Added all standard environment variables per CGI/1.1 specs
Passing sEncoded to urlDecode ByVal to preserve encoded data
Created separate function for storing name/value pairs
tPairs() is handled a little differently to allow adding to it dynamically

What header to use, depends on what server you're running
"Status: 200 OK"   - works with most
"HTTP/1.0 200 OK"  - works with some
none               - works with some

---------------------
Notes on version 1.2
---------------------
Added SendHeader() and SendFooter() subs to simplify coding.  
Form names are being decoded.
sFormData is now a public variable, and can be accessed from any module.
Decoding is done in a separate function: urlDecode().

Replaced the "HTTP/1.0 200 OK" header with "Status: 200 OK"
The former does not work with certain servers.
The latter should work with all servers.

--------------------
Kevin O'Brien  October 23, 1996
<obrienk@ix.netcom.com>

http://www.netcom.com/~obrienk  <=== check here for latest version of CGI4VB
