#!/usr/local/bin/perl
##############################################################################
# Cookie Counter Version 2.1 #
# Copyright 1996 Matt Wright mattw@scriptarchive.com #
# Created 07/14/96 Last Modified 12/13/96 #
# Scripts Archive at: http://www.scriptarchive.com/ #
##############################################################################
# COPYRIGHT NOTICE #
# Copyright 1996 Matthew M. Wright All Rights Reserved. #
# #
# Cookie Counter may be used and modified free of charge by anyone so long as#
# this copyright notice and the comments above remain intact. By using this #
# code you agree to indemnify Matthew M. Wright from any liability that #
# might arise from it's use. #
# #
# Selling the code for this program without prior written consent is #
# expressly forbidden. In other words, please ask first before you try and #
# make money off of my program. #
# #
# Obtain permission before redistributing this software over the Internet or #
# in any other medium. In all cases copyright and header must remain intact #
##############################################################################
# Allow script to use the Cookie Subroutines. You may need to change this #
# if cookie.lib is not in the same directory as this script. #
# Cookie Counter version 2.1 is written for HTTP Cookie Library 2.1 #
require 'cookie.lib';
# If there already is a count cookie, proceed without setting a new one. #
if (&GetCookies('count')) {
# Increment the counter. #
$Cookies{'count'}++;
# Print out the HTML Content-Type header. #
print "Content-type: text/html\n";
# Set the updated cookie with new count. #
&SetCookies('count',$Cookies{'count'});
# End the headers sent to browser. #
print "\n";
# Print Top of HTML Page #
print "\n";
print "