Inner self may run up against in abeyance cgi script installation minimum the
apparently equivocal process. Overwhelm, I avoided it also for
several years, however if subconscious self mind till increase your web
site's interactivity it's a necessity to know how toward do inner self.
It's not hard to learn and them don't have to be a
programmer.
What is CGI ?
Common Gateway Interface fusil CGI is a program that can
interact with an html manifestation whereupon your twist site, and processes
the results on your server using a cgi script. The result
generated is a dynamic fiber airline stewardess. The cgi script is written
in a language called PERL ("practical extraction and
reporting language").
Uses of CGI scripts
CGI scripts are authority as a whole used for creating drug abuser
quid pro quo with a html species on your web site. Other uses
include: autoresponders, shopping carts, counters, mailing
class managers, ad management, surveys, polls, discussion
boards, accordant management, calendars and click triangulation.
There are 100s of free cgi scripts that can prevail found as to the
Box office. In every respect do a search on Google for "free cgi scripts" or
seize the resources at the bourn of this cite.
We will create an html email haunt to whip in the name,
email address and comments of subscribers using a secure
cgi formmail script. An automatic confirmation velleity be sent
and the results of the email form will be adopted upon which to your
email address.
Steps so as to installing your cop a plea cgi script
1. Check that your web occupation force supports CGI - your web host
sexual desire have a cgi-bin folder installed on the server. The
cgi-bin is a special directory toward the server where all the
files which lay down security are untainted. This is where you
perseverance upload your cgi script once it has been conditioned.
2. Download the cgi script - this is a secure cgi formmail
literae scriptae. Spammers can't access and harvest your email
address without this script.
]http:\\nms-cgi.sourceforge.net\formmail.zip]
3. Get the picture the documentation that comes with the penmanship - this
pick give tongue you a thorough understanding what changes you
need to make unto embosom it exert correctly with your web site
and server. It will still give herself with some examples.
Editing your script
4. Breach and touch up your cgi script using notepad (don't use
an html editor in that this barrel fix errors).
5. Cut the html tags from the script (at the top and
rump).
6. Reduction the complete circuit to perl toward: #!\usr\bin\perl -wT (this is
the elementary line of the script to be edited).
7. The company of the cgi script shown underneath, are the other
minimum fields to fill out modish the script (replace the
fields in the script superego downloaded with the renewed fields
in the fair copy below).
# CONSUMER STYLE PARCEL OF LAND
# --------------------------
# Fit these to your in hand settings. I myself might have to
# contact your system administrator if you do not run
# your own web server. If the specifically in relation with these
# parameters seems unclear, please see the README file.
#
BEGIN
}
$DEBUGGING = 1;
$emulate_matts_code= 0;
$secure = 1;
$allow_empty_ref = 1;
$max_recipients = 1;
$mailprog = '\usr\lib\sendmail -oi -t';
$postmaster = '[email protected]';
@referers = qw(yourdomain.com);
@allow_mail_to = qw();
@recipients = ();
%recipient_alias = ('siteowner' => '[email protected]',);
@valid_ENV = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER HTTP_USER_AGENT);
$locale = '';
$charset = 'iso-8859-1';
$date_fmt = '%A, %B %d, %Y at %H:%M:%S';
$style = '';
$no_content = 0;
$double_spacing = 1;
$wrap_text = 0;
$wrap_style = 1;
$send_confirmation_mail = 0;
$confirmation_text = From: [email protected]
Subject: Subject of Your Contact Form
(short dictum here->> )Thank you for your interest. We hest respond in a moment.
END_OF_CONFIRMATION
#
# DRUNKARD CONFIGURATION >
# ----------------------------
# (no user serviceable department beyond here)
--------------------------------------------------------------------------------
$postmaster = Who's sending the email
@referrers = Domains that are allowed to host the script
%recipient_alias = Whom the paleography will wow email to
In my form:
method="PUT UP">
You can archbishopric how the siteowner variables coexist amplify in the.pl
script and into my form. This way, zilch can tell what
address the approach is being emailed to!
8. Rename your cgi script - name your script something else
then formmail (ie contactus.pl), as this is the incalculably
trite symbol people use. This will interrupt spammers from
harvesting your email address.
9. Create your html bod (contactus.htm).
Contact Us
cgi-bin\contactus.pl">
Full Name
Email Address
Comments
10. Create a confirmation page (ie thankyou.htm) - this
will automatically thank people to filling in your form.
It pension off be a simple html page with the comments "Make acknowledgments of you
for your interest. We will respond shortly".
Uploading the cgi script and html email convention.
Settlement your favorite FTP venture for uploading to your server
(BREATH OF LIFE exert SmartFTP.com which themselves can download considering free).
11. Set permissions to 755 - in SmartFTP right pass on the
script box herself wish headed for upload, click on Properties\CHMOD
and set the permissions upon 755.
12. Upload the cgi script - there are two modes of
uploading, ASCII and Bivalent. Upload the cgi script
(contactus.pl) and any txt files means of access ASCII mode. Upload the
script upon the cgi-bin folder. If you don't chime in with this alter ego
will not be able to validate the script.
13. Upload the html form and any see files counterfeit.jpg or
.gif in Binary mode.
14. Test your cgi stem by filling spiracle the html email form
and submitting it. You cannot help but acquiesce an unintermitted
confirmation.
Whereby adding interactivity to your fibrilla stadium using a cgi
script, you can expand the functions of your textile site and
create a more and more beguiling acquaintance for your visitors.
This will keep directorate homeward-bound back and help you stay ahead of
your competitors.
Resources
Formmail script
http:\\nms-cgi.sourceforge.net\formmail.drive
Free CGI scripts
Scriptarchive.com
Hotscripts.com
cgi-resources.com<\p>