#!/usr/local/bin/perl # # program name : tacssi (text-type access counter by Server Side Include) # # function : count the number of guest. # # calling form :Insert next line in html file, but remove first colum '#' # which means comment in perl. # # # note : This counter is made for Web site where both SSI and CGI # are available. # # programmer : makoto takenaka : takesoft@mxs.meshnet.or.jp # # copyright : (C) 1997 by Takesoft # # version(date): version 1. 0(Jan 8, 1996) # #(1) set constants. # # guest number file name $count_file = "/home/user3/user-id/public_html/count.txt"; # #(2) Increment $count. # open(COUNT_FILE, "+< $count_file") || die("tacssi: Unable to open $count_file"); flock(COUNT_FILE, 2); $count = ; $count++; seek(COUNT_FILE, 0, 0); print COUNT_FILE $count; flock(COUNT_FILE, 8); close(COUNT_FILE); # #(3) Insert access count number to html file. # print $count;