Hit Counter for Spinneret
doggiedoc
Posts: 2,241
I've been giving some thought to a hit counter for pages served from a Spinneret. I tried some 'free counter' code from xyz.com or somewhere like that but I kept having problems with the way I wanted to implement it.
I saw some code Beau Schwabe did that count's visitors. the first hurdle I see is the variable that holds the count gets reset with reboots. Perhaps saving to SD or EEPROM and reloading would be a fix for that.
Anybody done this yet?
Paul
I saw some code Beau Schwabe did that count's visitors. the first hurdle I see is the variable that holds the count gets reset with reboots. Perhaps saving to SD or EEPROM and reloading would be a fix for that.
Anybody done this yet?
Paul
Comments
I use the "I2C_ROMEngine" found on the OBEX with my SNTP object so that I can accumulate and totalize run times for various I/O pins and keep the data going through power cycles... works like a charm. I backup the data to an SD card as well.
I imagine the same principle would work for you just as well.
I'm thinking something like:
would work, but that's not really a visitor count.... rather just a counter for every time someone requests anything at all from the server.
Thanks for the ROM tip.
Paul
doggiedoc, I'm putting together source for you to use on the InterCoop. I'd like to use this exercise as a tutorial for others.