From this page, you can download server-side support scripts for our applets. These are completely free but copyrighted. You may only use them for our applets and you may not redistribute them. Counter Scripts: counter.pl (Click here to download) Developed by Mathias Johansson (Included with the permission of Mathias Johansson) Description: This is a perl script for counter applets such as the FallingCounter applet. Call it using a single parameter: "id" like this: http://www.yourserver.com/cgi-bin/counter.pl?id=213 It will create a data file named 213.txt on the directory you specify inside the script. You will have to edit the file and change the directory at the line highlighted with red: #!/usr/bin/perl use strict; # Change this variable to where you want # your count files to be. my $dir = ""; my ($id,$nr) = split(/=/, $ENV{'QUERY_STRING'}); $nr = ($nr/$nr==1)? $id : die; my $file = "$dir$nr.txt"; # Read count open(FILE, "< $file"); my $count = <FILE>; # Increment count open(FILE, "> $file") || die "Can't open $file: $!\n"; print FILE ++$count; print "Content-type: text/plain\n\ncount=$count"; exit; counter.jsp (Click here to download) Developed by Anibal Wainstein Description: This is a JSP script (Java Server Pages) for counter applets such as the FallingCounter applet. Call it using a single parameter: "id" like this: http://www.yourserver.com/counter.jsp?id=213 If you don't specify an ID, it will use a default ID called 1234. The data file will then be named 1234.txt. You will have to edit the .jsp file and specify a path relative to the default working directory for the JSP service. Change this at the folder variable. If you like, you can set the initial counting value that will be used when the script is first called. ... //Change folder value to the directory //you want the data txt file to be. String folder="../effectmaker/temp/";
//Default id, data file will be named "1234.txt" String id="1234";
//Initial count, the initial value to be counting from int initialcount=314515412; ... |