HyperActive Software

Home What's New Who We Are What We Do Solutions Resources

We make software for humans. Custom Mac, Windows, iOS and Android solutions in HyperCard, MetaCard, and RunRev LiveCode

Resources...

Introduction to LiveCode CGIs - A Tutorial

by Jacqueline Landman Gay
HyperActive Software

This tutorial will show you how to create CGIs using LiveCode and its scripting language. CGIs allow your web site to produce dynamic content, process data, and work with stacks while interacting with a web server.

This tutorial assumes you have a minimal understanding of a few basic concepts. You'll need to know where the main web directory and its CGI sub-directory are located on your server, and you'll need some familiarity with either an FTP program or a terminal program so that you can set file permissions. Please see the documentation for your FTP program or your operating system if you have questions about setting file permissions, or the location of these directories.

There has been a great deal of discussion about CGIs on the LiveCode Mailing List in the past. The mailing list is a good place to ask questions about anything that is not covered in this tutorial, or sections you may want more information about. If you are not already a member, you can join the LiveCode mailing list at their web site.

Start at the Table of Contents and work your way through the sections in order. If you are already familiar with CGIs written in other languages, you may find that you can skip some sections. However, best results are probably obtained by at least skimming through all parts of the tutorial.


With the introduction of the 4.0 engine, LiveCode no longer supports traditional CGI access. CGIs have been replaced by the remarkable iRev product, which allows direct LiveCode scripting inside web pages, without the need for external CGIs. However, in some cases the more traditional approach is required and in these cases CGIs are still useful. For this tutorial you will need a copy of Rev 3.5 or older. If you have a previous copy of LiveCode (formerly called Revolution,) use that version. If not, and you do have a legal licensed copy of LiveCode, contact me at the email address below and I'll see what I can do.

This tutorial will refer to "Revolution" throughout, since that was the last engine that supported CGIs directly at the time of this writing. Since then, LC 7.0 was re-enabled as a CGI engine, so you can also use that version or a later one as well.


Introduction to LiveCode/Revolution CGIs - Table of Contents