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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.