Err.... counter!作者：gugod 發佈於：
Somehow I am still asked to place a website counter for
I put the source code on github//gugod/errcount, a tiny PSGI app, but still uses DBI and requires a mysql server. It is not documented at all since it should be simple enough for anyone who can read some code. I mean... it's a counter, it adds one to somewhere and does nothing else. It really is that simple.
If you want to try it, add the following lines to your HTML, somewhere inside your
Here's how it looks like:
I HAZ VIZITRZ.
It uses the http referrer information so one host can have one counter. If there are no referrer information, a random number is yield. If you try to open that URL with your browser and get confused by what you see, yes, that's what it is supposed to be.
If you need it for production, please setup your own errcount server, or donate me to make it better and keep it up and running for you.
I hope that I write this one so I don't have to do it again.