in reply to adding save logfile feature

There is so much stuff wrong with that code I strongly suggest you drop it in favor of something else. Like looking at the server's access log, or using a real log analyzer.

Your hosting provider probably already has a statistics package installed, or otherwise use one of the free services that are available. I know some people are quite fond of nedstat, but that's just a suggestion, not professional advice :-)

Replies are listed 'Best First'.
Re^2: adding save logfile feature
by Anonymous Monk on May 04, 2005 at 18:49 UTC
    I dont know what bad is in that simple script. I use it, and its work, it send real stats by email. Sure, it can be improved(how?)I really hate use hosting provider ststistic due it extremelly inconvenience. Taking the statistic from webhost ISp it is impossible for me. even if will it possible, again, it slow, ugly process, requred logging into account, etc, etc.
      That script doesn't calculate any statistics, it just sends an email for every visitor. Even really simple statistics packages show the information in a much better format. As soon as you get more than 10 visits a day, you'll get bored with your approach - even if you dump all of those reports to file.

      As for logging in - I don't have to for the stats page on my site, and as far as I can see, neither do you need to log in for the nedstat reports. I would actually prefer opening a webpage (and log in, if I had to) once every other day to look at a nicely formatted report over going through 10 - 1000 email messages each day.

      As for the problems with the script - it's so horribly written that I'd rather not look at it again, but I wouldn't be surprised if someone with a little time on their hands could use it to send spam and/or break into your site.

      update: sorry if I seem a little rude, reading ugly code makes makes me angry. :-) I stand by my suggestions by the way. Please consider the problem you want to solve, then try to find a good solution. Don't keep hacking on a bad idea.

        I prefferthe only way for reading logs:
        htpp://www.domain/folder/logfile.txt
        No any logging, no useless charts, etc.
        In addition, I need get each separate visitor info by email(for fast info). And I don't want use *third party statistic service*, log in to their host, etc.
        I dont understand this approach.