Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Reset Hits

Quote Reply
Reset Hits
Hi,
I want to reset the number of hits each year and I have searched for ' reset hits' and have come up with nothing.

What I have done is to rename my existing folder 'Hits' to 'Hits2004' and created a new folder called 'Hits' with 777 permision. This is initially empty with just 'index.count'. After a few hits there is a number of files with the links number holding this information
'1
1103473559
80.3.32.10'
which I assume is the number of hits and ip address.

I rebuild the links but when I check the number of click through it is still the same i.e:-

A total of 26865 people have clicked through to this site
& 3745 people have viewed this profile page since 5-May-2002

The code which produces the above is as follows:-

A total of $rec{'Hits'} people have clicked through to this site<br> &amp; <!--#exec cgi="/cgi-bin/counters/counter.cgi"--> people have viewed this profile page since $rec{'Date'}

Does anyone have any idea how I can get around this problem or to point me in the right direction?

Thanks in advance.
Robin
Quote Reply
Re: [robinantill] Reset Hits In reply to
In addition to the hits.db, the number of hits for each link is recorded in it's entry in the links.db file. You would have to go through every line and remove the number there. You could use a script to do this; you may have to remove the field, then add it back in. There is such a script here:

http://www.gossamer-threads.com/...cgi?post=27938#27938


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Reset Hits In reply to
Thanks for the reply. I will take a look.
Regards,
Robin