[ale] Using access_logs to get counter info

Randy Janinda randy.janinda at ndcorp.com
Fri Jul 28 09:45:34 EDT 2000


On Fri, Jul 28, 2000 at 09:25:57AM -0400, Wandered Inn decided:
> You could get rid of grep and use perl for all of this.
> 
> How is the counter updated?  Via cron?  Via a web page?  Point is, all
> you would have to do is when you read the value in, sum that with the
> new log value, and update your file that contains your counter. You
> could make this a part of your log rotation process.
> 
> Patman wrote:
> > 
> > Hi,
> > 
> > Thanks for the grep help, just want I was looking for.  Here's my next
> > problem which I was hoping someone might give me some pointers in setting
> > up a photo hits counter:
> > 
> > So is there a perl guru in the house?  I really need help in keeping track
> > of photo hits on my pages.  This is a little different than just having a
> > counter on a page that gets bumped up per page access (since loading the
> > page will execute the counter script).

This is just an idea but since the most important aspect of the page
seems to be these pictures, maybe you should store them in a database.
This would allow you greater flexibility when dealing with them and it
would be trivial to have a table column that get's incremented every
time the picture is accessed from the table. This number would not get
reset when your access-logs do.

My thoughts,

Randy
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list