I'm sorry if this is the wrong topic, but I couldn't find anything for your "PHPCount" PHP Text Hit Counter...
First off, thanks for a great script! It works perfectly! Since I'm not very experienced with PHP or writing scripts - I was wondering if you could help me with a small adjustment to the counter.php file. I would like to make the counter either reset after a specified period of time - or, only keep hit data for a set length of time. For example, it would be great if the counter would only display a hit count from the previous 30 days. I'm not sure if this is possible - but somehow I would like to limit the output to a specific time frame.
Here's my counter.php file:
(REMOVED: no need to paste it, we can all download it)
It seems to me like this should be possible. If not, I can always manually delete data from the .TXT files whenever I want to reset the counter. But it would be nice if it could be automated through the script.
THANKS FOR YOUR HELP!
PHP Count help - I'd like to make an adjustment...
-
- Posts: 2
- Joined: Thu Feb 21, 2008 10:05 pm
You can use this file to reset all counts, just upload it in your counter folder and open in browser.
http://www.phpjunkyard.com/extras/phpcount_reset.zip
If your host supports Cron jobs you can setup a cron job to do this automatically every month.
http://www.phpjunkyard.com/extras/phpcount_reset.zip
If your host supports Cron jobs you can setup a cron job to do this automatically every month.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
-
- Posts: 2
- Joined: Thu Feb 21, 2008 10:05 pm
THANKS FOR YOUR HELP!
It's great that I can reset the counter automatically, but to be honest, I would prefer to show data for specified time frames - like page views over the past 30, 60, or 90 days. Since resetting the counter would bring page views back to zero, this wouldn't give visitors an accurate assesment of traffic (especially at the beginning of the month or whenever the counter is reset). Is it possible to have the counter adjust according to a specific number of days (ie: the last 30, 60 or 90 days) instead of resetting???
If you don't an add-on already written - or it woud take too much time - I understand. I'm just wondering if it's possible - that way I can start trying to get it accomplished.
THANKS AGAIN!
It's great that I can reset the counter automatically, but to be honest, I would prefer to show data for specified time frames - like page views over the past 30, 60, or 90 days. Since resetting the counter would bring page views back to zero, this wouldn't give visitors an accurate assesment of traffic (especially at the beginning of the month or whenever the counter is reset). Is it possible to have the counter adjust according to a specific number of days (ie: the last 30, 60 or 90 days) instead of resetting???
If you don't an add-on already written - or it woud take too much time - I understand. I'm just wondering if it's possible - that way I can start trying to get it accomplished.
THANKS AGAIN!
You'd need a more complicated way of tracking logs (daily in a MySQL database for example) to do that.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools