#!/usr/bin/perl
###################################################################
# MAIL STATS									
# Distribution by Psybercore.com, Inc.	info@superscripts.com    
#
# My name is Drew Star... and I am funky http://www.mp3.com/drewstar/
#
# http://www.superscripts.com/
#             
###################################################################
# MAIL STATS									
#                         
# Duplicating or redistributing this program without prior
# written consent is expressly forbidden.  You must Obtain
# permission before redistributing this software by any means.
# In all cases this copyright/license notice must remain intact.
#
# http://Marek'sScripts.w2w.cc/ 
#               
###################################################################

Copyright
====================

   Duplicating or redistributing this program without prior written consent is 
   expressly forbidden.  You must Obtain permission before redistributing this 
   software by any means. In all cases the copyright/license notice must remain 
   intact.


Description
====================

   This is a simple hidden counter which can be called through either an image 
   tag or SSI.  It will not only keep track of your visitors by day, month and 
   year but will send you an email giving you the previous days totals.


Features
====================

	- One script works with multiple pages.

	- Emails you at the end of each day with your hits for the day.


Requirements
====================

	- Perl 5

	- Unix Based Web Server

	- cgi capability

	- Sendmail


Installation Steps
====================

   A. Edit the first line of the main  script from #!/usr/bin/perl to the required
      Perl path specified on your server. (If you don't know contact somebody
      who does, such as a web host's technical support. Commonly it can be
      /usr/bin/perl, /usr/sbin/perl, /usr/local/perl, etc...)

   B. Modify the variables in the scount.cgi (open it using notepad and scroll down 
      until you see the line "Define Variables").


     1. $yourmail = "youremail\@yourdomain.com";
        ====================================================================
        Your email address.  Make sure you include the "\" before the @ symbol.  
        If you don't it will cause the script to crash.


     2. $subject = "Daily Counter";
        ====================================================================
        Enter the full path to sendmail on your server (If you don't know 
        contact somebody who does, such as a web host's technical support. 
        Commonly it can be /usr/lib/sendmail, /usr/sbin/sendmail, 
        /usr/bin/sendmail, etc...).


     3. $subject = "Crone Job";
        ====================================================================
        Enter the subject of the email notification.



   C. Upload scount.cgi and scount.dat into your cgi-bin directory using ASCII mode 
      (any other mode would make things not work).

   D. Chmod the scount.cgi to 755. Chmod the scount.dat to 777.



Script Usage
====================

   You can call Count 'n Send either through and image tag: 

   <img src="http://www.ABC.com/cgi-bin/scount.cgi" width="2" height="2">

   or through a standard SSI call:

   <!--exec cgi="/cgi-bin/scount.cgi"-->


   Multipage Option
   ====================================================================

   To use Count 'n Send with multiple pages you need to do two things.

		1) Create an empty file (Chmod 777) in the same directory as scount.cgi

		2) Append the name of the file, as a query string, when calling scount.cig 
		   (e.g. scount.cgi?page1.dat).


To Do List
====================

	- Add an optional graphic counter

	- Add check referrer




