Grant's CGI Framework (Obsolete)

by Grant Neufeld

Current Version: 2.0 dev 6

Download Version 2.0d6: (PGP 5 Signature file)

This software is obsolete and is maintained here for archival purposes only. Use at your own risk.

Where to Get It

Frequently Asked Questions
Version History

Mailing Lists
Related Info
Other Mac CGI Frameworks

Powered-By Logo
Applications of the Framework
Contacting the Author

Documentation (for version 2):

API - Memory - Resources
Utilities - TCP Networking - Display & Logging - Windows - Web Utilities


Grant's CGI Framework is a framework for writing 68K & PowerPC Macintosh CGI applications, and WebSTAR Server Plug-Ins, in C. The framework provides a unified API which compiles - without modification - as both CGIs and plug-ins.

Macintosh programming experience is not required (although it helps) - but at least a basic knowledge of the ANSI C language is required.

Major Features


I have been unable to come to a mutually acceptable redistribution agreement with StarNine, so you will need to get the WebSTAR API SDK from them, if you want to compile WebSTAR plug-ins:

The framework (1.0 beta 16) is also available at:

For your convenience, payments may be made through Kagi Shareware - which accepts credit cards, cheques, first virtual, etc. To pay through Kagi, use the specially configured Register application included with the framework. You may also download the Register application separately.


If you use the framework for profit or other commercial application, you are required to make fee and/or royalties payment. Details are included in the "Payment Details" file included with the framework.

I'm quite willing to negotiate a different arrangement if the default fees and royalties are not suited to your particular application.

Payment can be made online using a credit card through the Kagi Payment Service (Note that your billing statement will list them, not me. They pay me after receiving the funds. This is a lot easier than me having to handle payment services.)

Further Information

World Wide Web home page:

Grant's CGI Discussion, and Announcements, mail lists:

I've set up a mailing list for discussing this framework. It is intended to be a forum for information, ideas, questions and announcements about about writing CGIs (and the CGIs that have been written) using Grant's CGI Framework.

Send a message with the command "subscribe" (without quotes) as the subject to:

There is a list for those who only want the announcements - no discussion. It is mutually-exclusive with the grantcgi list, meaning that you can only subscribe to one of them since all the postings to grantcgi-announce are also made to grantcgi.

Send a message with the command "subscribe" (without quotes) as the subject to:

If you want more details on either of the lists, just send the command "help" instead of "subscribe".

Related Information Sources

Other Mac CGI Frameworks

Made With Grant's CGI Framework

Powered-By Logo

You can use this logo on web pages for software you've written using the framework. The image remains Copyright ©1996 Grant Neufeld.

Recommended Use:

<A HREF="">
<IMG SRC="poweredbygrantscgi.gif" ALT="Made With Grant's CGI Framework" WIDTH="159" HEIGHT="71">

Applications Built With Grant's CGI Framework

[Note: I am not legally responsible for the functioning or usability of any of the programs listed here -- except those programs listed as being written by me, which are subject to specific licensing and limitations which are documented within the documentation included with the distribution packages -- and offer no guarantees or warrantee of any kind for them.]

Count WWWebula
by Gregory S. Combs - <>
A graphical access counter for WWW pages. Returns a gif of a string of digits, displaying how many users have looked at the page.
Also available on Info-Mac at: /info-mac/comm/tcp/count-wwwebula-*-cgi.hqx
Random URL CGI
by Grant Neufeld
Randomly redirect the client to urls listed in a text file.
An example is available.
by Stefan W. Pantke
"Displays the data received from the HTTP-Server and transforms it into an HTML-page which is returned to the server/client as response. Thus the CGI is a nice tool to check forms, for example."
On Info-Mac at: /info-mac/comm/tcp/web/bounce-02-cgi.hqx
Web Server Screen Capture Utility
by Steve Maller -
Takes a screenshot of the current Macintosh screen, converts it to a .GIF file, and returns it to the web browser.
Available on Info-Mac at: /info-mac/comm/tcp/web/screen-capture-*-cgi.hqx
Interactive Clock
by Reginald Braithwaite-Lee -
Returns the current time, as a graphical analogue clock. (The page is view only, the CGI is not available for download yet)
File Type Info
by InfoDesign Corporation. (programmed by me)
An application for determining the file and creator types of files and applications. This serves as an example that the framework can be used for more than just CGIs and ListSTAR events - regular applications can be built with it, too.
Cool Messages
by Mark Kriegsman
This CGI won 4th prize at WebEdge 3!
Lets you leave messages waiting for someone on a web server. When they visit the site (any page), they first receive the message you left, and then Reload to resume browsing. Also supports leaving replies.
(Sorry, I don't have an URL for this yet).
Bacterial Endocarditis Prophylaxis Guidelines Query Form
by Rich Guerra
I met Rich at MacHack 96. He told me there about this experimental project. He also praised the framework there - so I asked him if he would be into writing up a blurb I could use to hype the framework. This is what he wrote:
Grant's CGI Framework acted as a comprehensive introduction to CGI programming in C in addition to allowing me to create in a very brief time an extremely useful tool for accessing medical information. I was able to quickly and easily rewrite an existing Applescript CGI and achieved about a 10fold performance increase. This framework is simply the best and most complete example code out there on the Internet that I've come across - and to top it off, through the efforts of its author, it keeps getting better! Highly recommended!
by Rick Reed
An easy to use indexing and search engine utility for Macintosh Web Server administrators. This utility allows custom search forms for multiple search realms on a server.
PrimeBase(tm) WebDAL
by SNAP Innovation GmbH.
A crossplatform multi brand connection between a webserver and a database. The CGI is using embedded DAL. This means, in the HTML page are DAL Segments, which are replaced with their output on execution.
The framework was used in prototyping the application.
by Grant Neufeld
PreProcessor CGI/Plug-In which can restrict unauthorized CGIs from running. Basically, it emulates "cgi-bin" control used on UNIX servers.
No Mail
by Grant Neufeld
Plug-In which provides the bare-minimum SMTP requirement for internet hosts by implementing the "521 host does not accept mail" response.

A big thank-you to the registered users who are financially supporting my work. It is much appreciated!

(And it helped me pay off my PowerMac...)

Contacting Grant Neufeld

Please note that it sometimes takes me a long time to reply to messages (I get too much email).

Contents: Nisto - Products - Mail Lists - Cree - Standards - Babylon 5

Privacy Statement, Legal Notices
Copyright ©1995-1998 Grant Neufeld. All rights reserved. abc