#!/usr/bin/perl # http://japhy.perlmonk.org/articles/tpj/1999-summer.html # http://www.devdaily.com/perl/edu/articles/pl010004.shtml # A website hitcounter which greps the http logs and writes # the resulting number into a file then called by ssi includes. # Runs from crontab every ten minutes. open(DATE, "date +%d\\\\/%b|"); $today = ; close(DATE); chomp($today); system("grep $today refer_log | grep -ci search > counter.txt");