* [gentoo-user] [OT] recomendations for web stats in php
@ 2005-08-06 15:34 Mauro Faccenda
2005-08-07 10:42 ` Oscar Carlsson
2005-08-07 11:40 ` Hans-Werner Hilse
0 siblings, 2 replies; 7+ messages in thread
From: Mauro Faccenda @ 2005-08-06 15:34 UTC (permalink / raw
To: Gentoo Users
Hi all,
I have an customer that has a website hosted in a chrooted environment
and want a stats page (hits, origin, etc...) I have access to the apache
logs but I don't have a shell access, so I was thinking if there is any
php script that reads the log file and plots a nice web page with those
stats.
Or can anyone suggest another solution?
Thanks in advance, ans sorry for the off-topic
[]'s
Mauro
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] [OT] recomendations for web stats in php
2005-08-06 15:34 [gentoo-user] [OT] recomendations for web stats in php Mauro Faccenda
@ 2005-08-07 10:42 ` Oscar Carlsson
2005-08-07 11:40 ` Hans-Werner Hilse
1 sibling, 0 replies; 7+ messages in thread
From: Oscar Carlsson @ 2005-08-07 10:42 UTC (permalink / raw
To: gentoo-user
Webalizer, awstats and analog (http://www.analog.cx/) are pretty nice :)
Saturday 06 August 2005 17.34 skrev Mauro Faccenda:
> Hi all,
>
> I have an customer that has a website hosted in a chrooted environment
> and want a stats page (hits, origin, etc...) I have access to the apache
> logs but I don't have a shell access, so I was thinking if there is any
> php script that reads the log file and plots a nice web page with those
> stats.
>
> Or can anyone suggest another solution?
>
>
> Thanks in advance, ans sorry for the off-topic
>
> []'s
> Mauro
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] [OT] recomendations for web stats in php
2005-08-06 15:34 [gentoo-user] [OT] recomendations for web stats in php Mauro Faccenda
2005-08-07 10:42 ` Oscar Carlsson
@ 2005-08-07 11:40 ` Hans-Werner Hilse
2005-08-07 12:46 ` glumtail
1 sibling, 1 reply; 7+ messages in thread
From: Hans-Werner Hilse @ 2005-08-07 11:40 UTC (permalink / raw
To: gentoo-user
Hi,
On Sat, 06 Aug 2005 12:34:58 -0300
Mauro Faccenda <faccenda@gmx.net> wrote:
> I have an customer that has a website hosted in a chrooted environment
> and want a stats page (hits, origin, etc...) I have access to the apache
> logs but I don't have a shell access, so I was thinking if there is any
> php script that reads the log file and plots a nice web page with those
> stats.
>
> Or can anyone suggest another solution?
Hm, I don't think using a simple php script would work very reliably.
Parsing the log files can become a heavy task depending on the
logfile's size. So I think it's always the best solution to run the
analyzer from command line.
You could e.g. run the analyzer on a different host where you have
command line access and can run that scripted every night. The
resulting stats pages and graphs can then be synced back to the web-
only server.
Another possibility would be to use desktop programs for the logfile
analysis. I don't know of good free programs here, but at least there
are a few very professional commercial ones.
Both solutions only require access to the logfile which you told you
have.
-hwh
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] [OT] recomendations for web stats in php
2005-08-07 11:40 ` Hans-Werner Hilse
@ 2005-08-07 12:46 ` glumtail
2005-08-08 16:36 ` A. Khattri
2005-08-08 16:54 ` kashani
0 siblings, 2 replies; 7+ messages in thread
From: glumtail @ 2005-08-07 12:46 UTC (permalink / raw
To: gentoo-user
Hi:
Why not write a GLOBAL script for collecting some usefull information?
And then just be included in every pages, store records in a
particular file.
2005/8/7, Hans-Werner Hilse <hilse@web.de>:
> Hi,
>
> On Sat, 06 Aug 2005 12:34:58 -0300
> Mauro Faccenda <faccenda@gmx.net> wrote:
>
> > I have an customer that has a website hosted in a chrooted environment
> > and want a stats page (hits, origin, etc...) I have access to the apache
> > logs but I don't have a shell access, so I was thinking if there is any
> > php script that reads the log file and plots a nice web page with those
> > stats.
> >
> > Or can anyone suggest another solution?
>
> Hm, I don't think using a simple php script would work very reliably.
> Parsing the log files can become a heavy task depending on the
> logfile's size. So I think it's always the best solution to run the
> analyzer from command line.
>
> You could e.g. run the analyzer on a different host where you have
> command line access and can run that scripted every night. The
> resulting stats pages and graphs can then be synced back to the web-
> only server.
>
> Another possibility would be to use desktop programs for the logfile
> analysis. I don't know of good free programs here, but at least there
> are a few very professional commercial ones.
>
> Both solutions only require access to the logfile which you told you
> have.
>
> -hwh
> --
> gentoo-user@gentoo.org mailing list
>
>
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] [OT] recomendations for web stats in php
2005-08-07 12:46 ` glumtail
@ 2005-08-08 16:36 ` A. Khattri
2005-08-08 17:36 ` daniel
2005-08-08 16:54 ` kashani
1 sibling, 1 reply; 7+ messages in thread
From: A. Khattri @ 2005-08-08 16:36 UTC (permalink / raw
To: gentoo-user
On Sun, 7 Aug 2005, glumtail wrote:
> Why not write a GLOBAL script for collecting some usefull information?
> And then just be included in every pages, store records in a
> particular file.
This is a horrible way to do it. A lot of free stats services do something
similar with a block of JavaScript (usually some code that hits a script
on the stats server while the page is loading).
Since your web server logs accesses and errors it does most of the work
for you! All you need to do is download the logs and run analog on them
(optional: you could also setup analog to feed data to reportmagic).
On our servers we have written scripts to do this weekly.
> 2005/8/7, Hans-Werner Hilse <hilse@web.de>:
> > Hi,
> >
> > On Sat, 06 Aug 2005 12:34:58 -0300
> > Mauro Faccenda <faccenda@gmx.net> wrote:
> >
> > > I have an customer that has a website hosted in a chrooted environment
> > > and want a stats page (hits, origin, etc...) I have access to the apache
> > > logs but I don't have a shell access, so I was thinking if there is any
> > > php script that reads the log file and plots a nice web page with those
> > > stats.
> > >
> > > Or can anyone suggest another solution?
> >
> > Hm, I don't think using a simple php script would work very reliably.
> > Parsing the log files can become a heavy task depending on the
> > logfile's size. So I think it's always the best solution to run the
> > analyzer from command line.
> >
> > You could e.g. run the analyzer on a different host where you have
> > command line access and can run that scripted every night. The
> > resulting stats pages and graphs can then be synced back to the web-
> > only server.
> >
> > Another possibility would be to use desktop programs for the logfile
> > analysis. I don't know of good free programs here, but at least there
> > are a few very professional commercial ones.
> >
> > Both solutions only require access to the logfile which you told you
> > have.
> >
> > -hwh
> > --
> > gentoo-user@gentoo.org mailing list
> >
> >
>
>
--
English
1. n. obs. The source code for a program, which may
be in any language, as opposed to the linkable or executable binary
produced from it by a compiler. The idea behind the term is that
to a real hacker, a program written in his favorite programming
language is at least as readable as English. Usage: mostly by
old-time hackers, though recognizable in context. 2. The official
name of the database language used by old the Pick Operating System,
actually a sort of crufty, brain-damaged SQL with delusions of
grandeur. The name permitted marketroids to say "Yes, and you
can program our computers in English!" to ignorant suits
without quite running afoul of the truth-in-advertising laws.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] [OT] recomendations for web stats in php
2005-08-07 12:46 ` glumtail
2005-08-08 16:36 ` A. Khattri
@ 2005-08-08 16:54 ` kashani
1 sibling, 0 replies; 7+ messages in thread
From: kashani @ 2005-08-08 16:54 UTC (permalink / raw
To: gentoo-user
glumtail wrote:
> Hi:
>
> Why not write a GLOBAL script for collecting some usefull information?
> And then just be included in every pages, store records in a
> particular file.
>
Because the first time you get any spike in traffic your performance
goes to hell especially if done through a db with a remote call.
I had to have just such a talk with a site recently after they ended up
on Howard Stern. It nearly took down the web servers before we figured
out what was causing the performance issues.
kashani
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] [OT] recomendations for web stats in php
2005-08-08 16:36 ` A. Khattri
@ 2005-08-08 17:36 ` daniel
0 siblings, 0 replies; 7+ messages in thread
From: daniel @ 2005-08-08 17:36 UTC (permalink / raw
To: gentoo-user
you might want to check out awstats (emerge awstats) it's a very in-depth
apache log analyser that'll parse combined-formated log files to capture all
sorts of handy information and graph it to be pretty too ;-)
barring that, you could write your own php (or whatever language you like)
-based script to handle pixel calls. something like this:
the page you track includes html display of a pixel. the img call for the
pixel looks like this:
<img
src="/pixel.php?name1=value&name2=value"
width="1"
height="1"
alt="tracking pixel"
/>
you can use your own code (even javascript if you wanna capture neat stuff
like client resolution and colour depth) and pass that in the query string to
your tracking server. your tracking code will look something like this:
<?
// capture query string data
foreach ($_GET as $name => $value) {
// do some logging of some kind
}
header('Content-type: image/gif');
header('P3P: CP="NOI NID ADMa OUR IND UNI COM NAV"');
header('Expires: Sat, 22 Apr 1978 02:19:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
printf(
'%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%',
71,73,70,56,57,97,1,0,1,0,128,255,0,192,192,192,0,0,0,33,249,4,1,0,0,0,0,44,0,0,0,0,1,0,1,0,0,2,2,68,1,0,59
);
?>
that'll output a transparent gif and make sure that it's not cached so you can
continue to log repeated page calls.
hope that helps ;-)
--
keep away from people who belittle your ambitions. small people always do
that, but the really great make you feel that you too can become great.
- mark twain
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-08-08 17:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-06 15:34 [gentoo-user] [OT] recomendations for web stats in php Mauro Faccenda
2005-08-07 10:42 ` Oscar Carlsson
2005-08-07 11:40 ` Hans-Werner Hilse
2005-08-07 12:46 ` glumtail
2005-08-08 16:36 ` A. Khattri
2005-08-08 17:36 ` daniel
2005-08-08 16:54 ` kashani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox