RachelPautler.com

When the words are many, sin is not absent, but he who holds his tongue is wise.
- Proverbs 10:19 NIV

Cooking Poetry HTML Artwork Links Romance Home

Calling CGI Scripts

If you are reading this page, you probably already know about CGI.  However, for those of you who don't, it is a way to use a "program" to add some spice to your site or to process information from a form.  CGI finds new and exciting ways to do just about anything you need on your website.

This page is dedicated to some of the scripts that RachelPautler.com has developed.  You may have seen similar scripts, but these are our originals that we will share with you.  All we ask is that you not remove our copyright information.

The first script we would like to share is the one for the random proverb, which can be found on our Home Page.

To use the random proverb on your page:

  1. Download the random.txt file, renaming it to random.cgi, and the proverbs.txt file by right clicking on the file and clicking "Save Target As. . ."
  2. FTP both files to the same directory as ASCII files and ensure that the cgi file is readable and executable like below:
  3. Copy the following text onto your webpage (You will need to change the path if you ftp the scripts into a bin other than cgi-bin):
    <!--# exec cgi="/cgi-bin/random.cgi" -->

The result is as follows:

If you do not wish the quote itself to be italicized, simply remove the '<i>' tag at the beginning of the line.  If this code does not work on your page, then your ISP or Web Host has the 'exec' function turned off for security reasons.  However, you can still use the link in other ways (like making a frame for it.)

The second script allows visitors to your page to share the link to your page with friends.  All they have to know is their own email address as well as their friend's email address.  

The code for the Share a Link is below:

<TABLE BORDER=2 BGCOLOR=#bbaaff CELLPADDING=5>
<TR><TD VALIGN="middle" ALIGN="center">
<FORM ACTION="/cgi-bin/sendLink.cgi" METHOD=post>
<B>Share this page with a friend!<P>
</B>
Your Email: <INPUT TYPE=text NAME='Sender'> 
Friend's Email: <INPUT TYPE=text NAME='Recipient'><BR>
(Note: DO NOT type multiple addresses.)<p>
<INPUT TYPE=submit VALUE='Send Link'>
</FORM><FONT SIZE=2>Copyright © 2001 <A HREF="http://www.rachelpautler.com" TARGET=_blank>RachelPautler.com</a>
</FONT>
</TD>
</TR>
</TABLE>

Feel free to change the background color of the table or rearrange the elements, just leave the Copyright information in the code.  Although, changing the names of the input fields will cause the script not to function for you.

An example of the confirmation message follows:

Message Sent!

The following message has been sent to your friend at webmaster@rachelpautler.com:

I thought you might enjoy the following page:

http://www.rachelpautler.com/


Enjoy!

We hope you have fun with these scripts, and please check back from time to time to see if we have more.

Copyright © 2005 Rachel Pautler
Last Modified: Tuesday, July 17, 2007
Send mail to rachel@rachelpautler.com with questions or comments about this web site.