i put a script together... the only problem is it works great, and writes a new file for all webpages
AS LONG AS THEY ARE IN THE FIRST SUBDOMAIN... i.e.
http://www.kidz4dayz.com/counter.html
i need to be able to use the counter "deeper" in the subdomains... i.e.
http://www.kidz4dayz.com/testfirstl...cond/test.shtml
but all i get is repeating #1... what can i do to this script to get it to work the way that i want...?
#!/usr/local/bin/perl
$pagepath = $ENV{'DOCUMENT_URI'};
$counter_file = "counter/$pagepath";
print "Content-type: text/htmlnn";
open(FILE, ">>$counter_file");
close(FILE);
open(FILE, "$counter_file");
@indata = <FILE>;
close(FILE);
$onoff = 0;
open(FILE, ">$counter_file");
foreach $temp (@indata)
{
chop($temp);
($uri, $count) = split(/|/, $temp);
if ($uri eq $pagepath) {
$count++;
$onoff = 1;
print FILE "$uri|$countn";
print "$count"; }
else { print FILE "$uri|$countn"; }
}
if ($onoff eq 0) {
print FILE "$pagepath|1n";
print "1"; }
close(FILE);
thanks so much...
[This message has been edited by tucats (edited January 25, 2000).]