Shortstat installed
In continuing to play with the site (and in anticipation of a few actual articles actually being written) I have installed ShortStat, from the man himself Shaun Inman, so that I get all the spiffy info that comes with it.
My version is located here for all to poke fun at. As usual I couldn’t leave well enough alone and had to fiddle with it a little bit.
In setting it up I noticed I was the only one registering any hits. This is totally understandable as no one visits this site, but that aside, I hated seeing myself inflating the numbers. So I added a new paramater to the configuration.php file that is an array of IP’s that should be ignored. Then in the inc.stats.php file I added a check to see if the current IP was in that array. If not, then it would continue on it’s merry way. If it was, it would skip all the stat taking parts and it would be as if I was never there **queue tumbleweed**.
After testing this for a while I’ll let Shaun know about the concept so he can decide to add it to the actual program or not. Then again, last time I waited to write Shaun about something, he found out about it before I even had the chance to tell him. Sneaky little devil.
Update
After looking at my stats the next morning I was amazed to see 54 or so visitors. I thought that there is no way this could be, and so on further inspection all but like 3 of them were Search Bots, and RSS Aggregators. So I added two more options to the script. Variables to turn tracking of those two things on and off.
countBots - lets Short Stat do it’s normal checks on the User Agent. If it is returned as “Crawler/Search Engine” and this variable is “false”, then the insert doesn’t occur.
countFeeds - If the $res variable has “/feed/” in it (working through a WordPress install, so this won’t be globally true) and this variable is false, then the insert doesn’t occur.
Will continue to add any edits I make, and how things go after they run for awhile.
Looks like qualifying the Shortstat link with “index.php” redirects back to homepage. zelph.com/shortstat/ got me there.
Interestingly, we might want to let our good buddy Lars know that someone’s looking for him… unless the search’s aim is to find out if someone Lars is hacking… er, yeah.
I like it — especially your add-ons. I think Shaun should add those to his version. (aslo, I had the same issues as Fance — your link took me to the main index page, but typing zelph.com/shortstat did the trick.
I think it actually has to do with the.htaccess that does the mod_rewrite for the URL’s. I tried both the / and /index.php version and both did it. It seems to only happen when linking from this page, if you type it in to the URL bar yourself, it works fine… which is basically what you both did when changed the address.
Examples: http://www.zelph.com/shortstat/ http://www.zelph.com/shortstat/index.php
I intend on looking into it at some point, but that may have to wait a bit.
Oh, and yeah… I saw the “lars hacking” search. I looked at the actual entry in the database and the user was on an Apple with Safari, and the IP was based in the area. So am thinking it was him Googling himself.