Page hits = 8196 since 1/18/03


Shelby Zone Guestbook - This is a link to my wife's guestbook.


Stuff You Probably Don't Care Diddly About (but you will probably click on it anyway)


This is my first PERL script. Yeah, so what!


Give me a Cookie! This will put a cookie on your computer.

Take your cookie BACK! This will remove the cookie from your computer.


Add apple cookie
Add banana cookie


Web Store Tools

Web store log analysis You gotta have the password to see this.
Web store check setup Won't mean much to the average joe.
General Store with Frames



Display the Web Server's Environment Variables - (not using a Server Side Include script)



Display the Web Server's Environment Variables (using a Server Side Include script):
This uses the "#include virtual" tag to invoke the cgi script so the QUERY_STRING environment variable can be passed via the query string appended to the URL.
QUERY_STRING_UNESCAPED will pass the query string passed to this HTML page by the link which invokes it.
This method is preferred over "exec cgi" and "exec cmd", as per the Apache server documentation.

Example: <!--#include virtual="/cgi/ssi_display_environment_variables.cgi?argument=value" -->

SERVER_SOFTWARE --> Apache
GATEWAY_INTERFACE --> CGI/1.1
DOCUMENT_ROOT --> /www/htdocs/domains/s11/01746/www.folsomvillage.com/webdocs/
REMOTE_ADDR --> 38.103.63.61
DATE_LOCAL --> Thursday, 09-Jul-2009 16:08:45 PDT
REQUEST_METHOD --> GET
QUERY_STRING --> argument=value&My Name=Mike Schoonover
DOCUMENT_URI --> /Test_Page.shtm
HTTP_ACCEPT --> Accept: text/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
REMOTE_PORT --> 29932
SERVER_ADDR --> 207.217.111.64
HTTP_ACCEPT_LANGUAGE --> en-us,en;q=0.5
HTTP_CACHE_CONTROL --> no-cache
SCRIPT_FILENAME --> /www/htdocs/domains/s11/01746/www.folsomvillage.com/webdocs/cgi/ssi_display_environment_variables.cgi
HTTP_ACCEPT_ENCODING --> gzip
DOCUMENT_PATH_INFO -->
SERVER_NAME --> www.folsomvillage.com
HTTP_PRAGMA --> no-cache
SERVER_PORT --> 80
SERVER_ADMIN --> websupport@earthlink.net
DOCUMENT_NAME --> Test_Page.shtm
SCRIPT_URI --> http://www.folsomvillage.com/Test_Page.shtm
DATE_GMT --> Thursday, 09-Jul-2009 23:08:45 GMT
SCRIPT_URL --> /Test_Page.shtm
SERVER_PROTOCOL --> INCLUDED
HTTP_USER_AGENT --> CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
PATH --> /usr/local/bin:/usr/bin:/bin
TZ --> US/Pacific
HTTP_CONNECTION --> Keep-Alive
HTTP_NNCOECTION --> close
LAST_MODIFIED --> Tuesday, 18-Dec-2007 11:48:04 PST
SCRIPT_NAME --> /cgi/ssi_display_environment_variables.cgi
HTTP_X_CC_LIST --> List:1 For:207.217.125.50
HTTP_ACCEPT_CHARSET --> ISO-8859-1,utf-8;q=0.7,*;q=0.7
REQUEST_URI --> /Test_Page.shtm
HTTP_HOST --> www.folsomvillage.com
USER_NAME --> www.folsomvillage.com




Display the Web Server's Environment Variables (using a Server Side Include script):
Both QUERY_STRING and QUERY_STRING_UNESCAPED will transfer the query string passed to this HTML page by the link which invokes it - you cannot pass a query string to the cgi script by appending to the script's URL as you can with the "#include virtual" tag (see above). You must append the query string to the URL for this HTML page instead.
It is better to use "#include virtual" rather than "exec cgi" - see above.

Example: <!--#exec cgi="cgi/ssi_display_environment_variables.cgi" -->

SERVER_SOFTWARE --> Apache
GATEWAY_INTERFACE --> CGI/1.1
DOCUMENT_ROOT --> /www/htdocs/domains/s11/01746/www.folsomvillage.com/webdocs/
REMOTE_ADDR --> 38.103.63.61
DATE_LOCAL --> Thursday, 09-Jul-2009 16:08:45 PDT
REQUEST_METHOD --> GET
QUERY_STRING -->
DOCUMENT_URI --> /Test_Page.shtm
HTTP_ACCEPT --> Accept: text/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
REMOTE_PORT --> 29932
SERVER_ADDR --> 207.217.111.64
HTTP_ACCEPT_LANGUAGE --> en-us,en;q=0.5
HTTP_CACHE_CONTROL --> no-cache
SCRIPT_FILENAME --> /www/htdocs/domains/s11/01746/www.folsomvillage.com/webdocs/cgi/ssi_display_environment_variables.cgi
HTTP_ACCEPT_ENCODING --> gzip
DOCUMENT_PATH_INFO -->
SERVER_NAME --> www.folsomvillage.com
HTTP_PRAGMA --> no-cache
SERVER_PORT --> 80
SERVER_ADMIN --> websupport@earthlink.net
DOCUMENT_NAME --> Test_Page.shtm
SCRIPT_URI --> http://www.folsomvillage.com/Test_Page.shtm
DATE_GMT --> Thursday, 09-Jul-2009 23:08:45 GMT
SCRIPT_URL --> /Test_Page.shtm
SERVER_PROTOCOL --> INCLUDED
HTTP_USER_AGENT --> CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
PATH --> /usr/local/bin:/usr/bin:/bin
TZ --> US/Pacific
HTTP_CONNECTION --> Keep-Alive
HTTP_NNCOECTION --> close
LAST_MODIFIED --> Tuesday, 18-Dec-2007 11:48:04 PST
SCRIPT_NAME --> /cgi/ssi_display_environment_variables.cgi
HTTP_X_CC_LIST --> List:1 For:207.217.125.50
HTTP_ACCEPT_CHARSET --> ISO-8859-1,utf-8;q=0.7,*;q=0.7
REQUEST_URI --> /Test_Page.shtm
HTTP_HOST --> www.folsomvillage.com
USER_NAME --> www.folsomvillage.com




Mike's Free Perl CGI Scripts


I have written a few Perl CGI scripts because I wanted some special features and total control over the source code. Please feel free to use them as you see fit, give me credit if it's due, and send me money if you have any extra.

There are several scripts in the zip file - read below for some explanation and a list of some of the more interesting features. Most of the scripts used on this site are included, except for the web store because that came with a book I bought and I only modified it slightly.

You can probably figure out how to modify them for your own use. If not, email any questions by clicking here > Help!

Click Here to Download Mike Schoonover's Perl CGI Scripts



guestbook.cgi

This guestbook will email you whenever someone leaves a message. Now you don't have to continuously check the darned thing every day to see if there are any new entries. Click here to see an example of the guestbook in action, and leave a message while you're there! (click here)



hit_counter.cgi

This is a hit counter with a really nice feature - it won't count the hits when you yourself (the webmaster) view the sight!

A hit counter is usually used to count the number of times a page is viewed and then display that count on the page. But as the webmaster, you may hit your site more than other viewers because you are working on it or testing it. It is not generally interesting how many times the webmaster has viewed the site, it is the other people you want to know about.

The script looks for a special cookie on the webmaster's computer (or anyone else with the cookie - like your family) and won't count their viewing as page hits. See the bottom of this page (click here) and view the JavaScript in the HTML source for this page for a simple way to set any cookie on a computer.



display_environment_variables.cgi & ssi_display_environment_variables.cgi

Two examples of how to access and/or display the environment variables on your server. These are important because they tell you things such as the viewer's IP address, cookies from your site on the viewer's computer, time and date, and other useful info. You can also use these variables to retrieve data submitted by the viewer when they fill out a form on your web page.

The first cgi script is designed to be called with a link. It will display the variables on a new page. The second script is designed to be invoked with the HTML command "<!--#include virtual..." and displays the variables on the page containing that command (of course you must fill in the rest of the command properly).

Look higher on this page for examples of how both of these scripts work (click here). Look at the HTML source for this page for an example of how to invoke both types of script.



email_ip_address.cgi

Emails the current IP address of any viewer of your web page to any email address. I use it for two purposes:

I can send a pop window to the viewer (using "net send" in DOS) to interract with them.

If you are trying to use PC Anywhere to link with a machine run by novices, you can have them browse to your website and click the link to send their current IP address. This avoids having to explain how to find their IP address manually - especially important if they speak a different language, making verbal communication difficult.



mail-lib.pl

This is a library which simplifies sending email from a Perl CGI script. It was written by Gunther Birznieks - read the comments in the script for more information.
 
This library is required by the email_ip_address.cgi and guestbook.cgi scripts.



cookie_setter.cgi & cookie_eater.cgi

Super simple little scripts to show you how to set or remove a cookie using a Perl CGI script. These are useful if you are trying to do this for the first time as they are as simple as can be made. Higher on this page are links to demonstrate these two scripts (click here)




Place a Cookie in Your Browser

Name = Value

=



Return to Folsom Village