#!/usr/bin/perl ############################################################################### # # IC-HitCounter 1.5 # # Program name: IC-HitCounter # Program version: 1.5 # Program name defined: 'Internet Coders Hit Counter' version 1.5 # Program purpose: Providing a way for customers to search your website. # # # Written by: shawn@internetcoders.com # Downloaded at: www.internetcoders.com # Date released: 05/27/2002 # Last modified: never # # System requirements: Linux,Perl # # Liability: InternetCoders.com and or all individuals of InternetCoders.com # are in no way liable for anything that this program may do while # in use modified/unmodified. You the person choosing to run this # program take full responsibilites for this code and everything # it does. It's simple, you don't want to take responsibility for # this code, then don't use it # # Support: If you have any questions about this program please refer to # the documentation/instructions that came with the program. Since # this program was free there is no e-mail or phone support. However # support is available if you pay for it, or if you pay for cusomizations. # To pay for support or cusomizations please visit our website at # http://www.internetcoders.com # # Distribution: Since you did not write this code, you are not allowed to distribute # it modified or unmodified. If you want someone to have this code then # tell them to download it from InternetCoders.com, if it is # not on the InternetCoders.com website at that time then that # person is out of luck and will not be able to download it until # we post it again, unless you get permission from InternetCoders.com # # Modifications: You are allowed to fully modify any of this code you like. Please # refer to the Distribution section above before giving away copies # of this code whether modified or unmodified. # ############################################################################### print"Content-type:text/html\n\n"; use CGI qw(param); $ID = param(ID); open(R, "hits.txt."); @R = ; close R; chomp @R; foreach $L(@R){ ($N,$V)=split(/\=/, $L); $ID{$N}=$V; } $ID{$ID}++; @TheKeys = keys(%ID); foreach $L(@TheKeys){ $L = "$L=$ID{$L}\n"; } open(W, ">hits.txt"); print W @TheKeys; close W; print qq~ document.write( $ID{$ID} ); ~;