Googling for this finds me a ton of stuff that doesn't actually do what I'm looking for.
I want a simple hit counter cgi script of some kind that will increment a counter on every page load but I want to access the counter from a different page.
In other words, I don't want to have a visible hit counter on the webpage itself. I want to have a different webpage that will show me the number.
On Friday, November 26, 2010 02:00:04 pm Frank Cox wrote:
Googling for this finds me a ton of stuff that doesn't actually do what I'm looking for.
I want a simple hit counter cgi script of some kind that will increment a counter on every page load but I want to access the counter from a different page.
In other words, I don't want to have a visible hit counter on the webpage itself. I want to have a different webpage that will show me the number.
wouldn't webalyzer do that for you?
Dave
On Fri, 26 Nov 2010 15:45:47 -0800 Dave Stevens wrote:
wouldn't webalyzer do that for you?
Webalyzer would create a report containing a lot of data that I don't need. All I want is a single number.
The perl script that Tommy Craddock found looks like it's just the thing. I'll set it up over the course of this next week and see what develops.
On 11/27/10 9:45 AM, Frank Cox wrote:
On Fri, 26 Nov 2010 15:45:47 -0800 Dave Stevens wrote:
wouldn't webalyzer do that for you?
Webalyzer would create a report containing a lot of data that I don't need. All I want is a single number.
I've always liked analog as web log analyzer. It's fast and you can make it generate as much or as little as you want - but it would normally be a once-a-day run, not a live update.
The perl script that Tommy Craddock found looks like it's just the thing. I'll set it up over the course of this next week and see what develops.
That may work for a small site. I wouldn't expect anything that locks a single file for updates on every hit to scale well. And it means you need to have somewhere that is writable by the web server which is not a great idea if you can avoid it.
On Fri, 26 Nov 2010, Frank Cox wrote:
To: centos@centos.org From: Frank Cox theatre@sasktel.net Subject: [CentOS] simple website hit counter
Googling for this finds me a ton of stuff that doesn't actually do what I'm looking for.
I want a simple hit counter cgi script of some kind that will increment a counter on every page load but I want to access the counter from a different page.
In other words, I don't want to have a visible hit counter on the webpage itself. I want to have a different webpage that will show me the number.
Hi Frank.
Is this for one particular page, or every page on your site?
Regards,
Keith
On Sat, 27 Nov 2010 00:04:35 +0000 (GMT) Keith Roberts wrote:
Is this for one particular page, or every page on your site?
A small business owner that has a webpage on a Centos webserver that I look after asked me for a simple counter to count the number of hits that she gets on her webpage (index.html).
Awstats and similar log analyzers provide far more information than she cares about, understands or wants to see, and most of the hit counters that I can find on a google search either put the count on the same page that is being counted, or are trying to sell some kind of a third-party service.
I could probably write this thing myself if I have to but it seems so basic that I figure I would be reinventing the wheel. I could read access.log and count hits on a daily basis or something, but I'm not sure that I understand the log structure well enough to do it right. There are several files names index.html on that webserver and on a cursory examination it seems that a lot of the time the initial hit on a website is logged as "/".
On Nov 26, 2010, at 17:00, Frank Cox theatre@sasktel.net wrote:
Googling for this finds me a ton of stuff that doesn't actually do what I'm looking for.
I want a simple hit counter cgi script of some kind that will increment a counter on every page load but I want to access the counter from a different page.
In other words, I don't want to have a visible hit counter on the webpage itself. I want to have a different webpage that will show me the number.
-- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com
For much less effort you can setup Google Analytics and also get a lot more information. Otherwise, you should probably take a look at one of the reporting packages like AWstats that analyze the Apache logs. No one really uses those simple counters much anymore.
On 11/26/2010 11:00 PM, Frank Cox wrote:
Googling for this finds me a ton of stuff that doesn't actually do what I'm looking for.
I want a simple hit counter cgi script of some kind that will increment a counter on every page load but I want to access the counter from a different page.
In other words, I don't want to have a visible hit counter on the webpage itself. I want to have a different webpage that will show me the number.
Have you looked at Piwiki? See http://piwik.org/
Regards, Patrick
On Sat, 27 Nov 2010 02:20:01 +0100 Patrick Lists wrote:
Have you looked at Piwiki? See http://piwik.org/
As with awstats, that looks like it does far more than just count hits on index.html.
I've found a stack of comprehensive reporting tools, and I've also found a ton of counters that put the number on the webpage that's being counted.
Unfortunately, I still haven't found a simple counter that puts the count on a different webpage.
On 11/26/2010 11:24 PM, Frank Cox wrote:
On Sat, 27 Nov 2010 02:20:01 +0100 Patrick Lists wrote:
Have you looked at Piwiki? See http://piwik.org/
As with awstats, that looks like it does far more than just count hits on index.html.
I've found a stack of comprehensive reporting tools, and I've also found a ton of counters that put the number on the webpage that's being counted.
Unfortunately, I still haven't found a simple counter that puts the count on a different webpage.
Webalizer comes with CentOS. I find it easy to enable and provides all the basic stats one would need.
On Fri, 26 Nov 2010 23:32:07 -0500 John Hinton wrote:
Webalizer comes with CentOS. I find it easy to enable and provides all the basic stats one would need.
As far as I'm aware, webalizer is a comprehensive reporting tool similar to awstats. Which is a much bigger hammer than what I'm looking for.
On Nov 26, 2010, at 11:37 PM, Frank Cox wrote:
On Fri, 26 Nov 2010 23:32:07 -0500 John Hinton wrote:
Webalizer comes with CentOS. I find it easy to enable and provides all the basic stats one would need.
As far as I'm aware, webalizer is a comprehensive reporting tool similar to awstats. Which is a much bigger hammer than what I'm looking for.
-- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Hello,
How about something like this:
http://www.abiglime.com/webmaster/articles/cgi/110497.htm
Perl script which shows the count. You dont have to display it on the main page even, can set it up to display on a page only the customer has access to.
Tommy Craddock Systems Administrator tommy@hivelocity.net Hivelocity.Net Impressive Support
On Sat, 27 Nov 2010 00:03:25 -0500 Tommy E Craddock Jr wrote:
How about something like this:
http://www.abiglime.com/webmaster/articles/cgi/110497.htm
Perl script which shows the count. You dont have to display it on the main page even, can set it up to display on a page only the customer has access to.
In the immortal words of Wayne, "Schwing!"
That looks like it'll do the job.
Thanks!
On Fri, 26 Nov 2010, Frank Cox wrote:
To: CentOS mailing list centos@centos.org From: Frank Cox theatre@sasktel.net Subject: Re: [CentOS] simple website hit counter
On Sat, 27 Nov 2010 00:03:25 -0500 Tommy E Craddock Jr wrote:
How about something like this:
http://www.abiglime.com/webmaster/articles/cgi/110497.htm
Perl script which shows the count. You dont have to display it on the main page even, can set it up to display on a page only the customer has access to.
In the immortal words of Wayne, "Schwing!"
That looks like it'll do the job.
Thanks!
That looks OK to me as well.
I might be releasing some code on my website soon for the download counter you can find at:
http://www.karsites.net/centos/anyuser/kickstart-PDF-manual.php
It's written in PHP 5, and uses a configurable OOP class, and saves the download count for each file downloaded into a simple 2 column SQLite3 database.
I've also written a PHP class that sends an email each time somebody lands on a specifie page.
Kind Regards,
Keith Roberts
On 11/26/2010 11:37 PM, Frank Cox wrote:
On Fri, 26 Nov 2010 23:32:07 -0500 John Hinton wrote:
Webalizer comes with CentOS. I find it easy to enable and provides all the basic stats one would need.
As far as I'm aware, webalizer is a comprehensive reporting tool similar to awstats. Which is a much bigger hammer than what I'm looking for.
You set it to run once per day against the logs for that website... normally around midnight. The loads aren't that bad. The reporting I think defaults to 12 months of stored data which is stored normally in a directory in the web root for that website. That directory of course can be protected by something like htaccess.
Most of the old hit counters counted 'hits' instead of pages. So if a page had the text document and 9 graphics they counted as 10 'hits', not 1 'page view'. It has been maybe 6 or 8 years since I've bothered to look at these counters as they are pretty much antiques now.