Forum Moderators: coopster

Message Too Old, No Replies

From Webalizer to PHP

Is there any way to get stats from Webalizer

         

twist

7:28 am on Jan 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I want to add a hit counter to a footer.php file. I want to add a small piece of text at the bottom of every page saying how many times that page has been viewed.

I am switching to a new host in a couple of months. In a email they told me that mysql databases can't be used for hit counters. I asked them why. They told me that page count information is already generated by a Cron job and it could be used to create the counter info. He said once I sign up he would show me how to do it.

My current webhost uses webalizer, which I know very little about. Webalizer Ver. 2.01-10. I wasn't to get my website set up to start using counters, but I have no idea how to get the information from Webalizer to php. I can open up webalizer in my browser and see how many hits each has gotten.

I am sure this has probably already been covered, but any help, including a link would be great.

If there is a better program that I can install on I would love to hear about it.

Thanx

dcrombie

10:23 am on Jan 14, 2004 (gmt 0)



Mysql databases clearly CAN be used for hit counters but I guess they want you to use their CGI script installed that does the same thing using less resources?

You don't want to try extracting page counts from webalizer - for one thing I don't think the data you need is there.

jatar_k

4:16 pm on Jan 14, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You could just use a textfile and read and write the number there.

twist

10:44 pm on Jan 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could just use a textfile and read and write the number there.

I have over 1000 pages and growing otherwise I would use this method. I really need a good stats program that will let me grab this info.

jatar_k

12:06 am on Jan 15, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You could look through the Tracking and Logging [webmasterworld.com] Forum. There are discussions about tracking programs.

You could also try hotscripts.com to see if they have anything there.

I have used flatfile trackers on very busy sites with more pages. Why do you want to show it on the bottom of every page? I don't really put much stock in the counters on sites, but that's just me.

If your new host is going to show you how why not just wait until then?

Zygimantas

11:44 pm on Jan 16, 2004 (gmt 0)

10+ Year Member



You can read usage_thismonth.html file in webalizer's folder and extract required values.
If you need performance, use cron to read webalizer stats every 5 minutes and write to special file for easier processing in the future.

twist

2:01 am on Jan 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can read usage_thismonth.html file in webalizer's folder and extract required values.
If you need performance, use cron to read webalizer stats every 5 minutes and write to special file for easier processing in the future.

Thanks, exactly what I was looking for.

jatar_k

2:55 am on Jan 17, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



nice Zygimantas,

Welcome to WebmasterWorld