Now I have a question, please don't give me any codes...I just need ideas on how to do this. I have a counter I made a while back but I want to track $totalhits, $hitstoday, $weekhits. How could I go about setting it up so it logs total hits, hits done today and hits done this week? I've never worked with time scripts so I'm pretty clueless. Any guidance (but NO codes please, I want to write this myself) would be so appreciated!#!/usr/bin/perl -w open( STDERR, ">>/home/sulfericacid/public_html/test/error.log" ) or die "Cannot open error log, weird...an error opening an error log +: $!"; use CGI::Carp 'fatalsToBrowser'; use strict; use warnings; use POSIX; use CGI qw/:standard/; # INIT { $| = 1 } require SDBM_File; my %emails; my $list = "list.dbm"; my $adminmail = 'admin@test.com'; my $sendmail = "/usr/lib/sendmail"; print header, start_html('Email Management'); print start_form(), table( Tr( td("Email: "), td( textfield( -name => 'email', -size => 40 ) ) ), Tr( td(), td(submit) ), ), end_form(), hr(); if ( param() ) { my $email = param('email'); if ( param('email') ne "" ) { tie %emails, 'SDBM_File', $list, O_CREAT | O_RDWR, 0644; if ( !tied %emails ) { warn("database unsuccessful $!.\n"); } $emails{$email} = " "; print "Email address added to database!"; foreach ( sort keys(%emails) ) { print "$_ => $emails{$_}<br>"; } } else { print "Where is the email?\n"; } } print end_html();
Thanks everyone
"Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"
sulfericacid
In reply to DB Ovewriting (again..)/ Counter Question by sulfericacid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |