You are reading an archived post from the first version of my blog. I've started fresh, and the new design and content is now at


December 23, 2004

I’ve been looking at my installation of ShortStat created by Shaun Inman, and noticed that while there is a lot of valuable information that ShortStat is tracking, I don’t necessarily want to see all of the items ShortStat shows. Sometimes I do want to see everything, but certainly not most times. Most times I’m really just after the latest referrers, just to see if anything new is coming through the pipe.

So, here is ShortStatom – which takes some of the core ShortStat code, and is modified to produce an Atom feed from the latest referrers tracked with ShortStat. It is a lot quicker, and ultimately convenient to view it in my RSS/Atom reader of choice.

Installation, if you can call it that…

Grab the ShortStatom feed.phps file, save it as feed.php (or whatever you want to save it as), add it to your ShortStat directory, and subscribe to that URL. Mine is at (no need to subscribe though — I’ll be shutting it down so that it will only be served to my IP fairly soon, and besides, why would you want to see my stats anyway?)


Just a couple of quick notes — each <entry>...</entry> in an Atom feed has to have a link to a file for an alternate format. I’ve linked it by default to /shortstat/ off of the root of my domain. If you have shortstat in a different place, then obviously you’ll need to modify the code on line 77:

link rel="alternate" href="http://" . $_SERVER[SERVER_NAME] . "/shortstat/"

Also – I am aware that the Atom feed generated by the code doesn’t validate as each entry doesn’t have a valid “tag”. It is still well-formed, but definitely doesn’t validate. Technically, I should never re-use one of these id’s – they should be unique forever and ever.

However, given that the data is transient, and is only served in Atom format out of convenience, and given that I’m the only one who will be able to subscribe to the feed, I’m not sure I really want to worry so much about globally unique id’s.

The Future

Like most things we do, I’ve already got a few changes/additions in mind – like abstracting some of the logic and using some XSLT to create an RSS version as well. Of course, then I won’t be able to call it ShortStatom any longer, and I certainly don’t like the way ShortStRSS sounds…

Enjoy, and happy holidays to you and your families…

Filed under:

5 Responses

Comment by Mike P. — Dec 23 2004 @ 5:36 am

Cool idea Derek – now I’ll have to give shortstat a try… or add an rss feature to my own tracking!! Nice! Inspiration…

Happy Holidays!

Comment by Andrew Krespanis — Dec 23 2004 @ 6:58 am

w00t! Had it setup in 52 seconds — very cool Mr Featherstone :D

Comment by Mike D. — Dec 23 2004 @ 11:58 am

Mmmm, nice. Ping Shaun for the latest beta… I think you’ll like…

Comment by Mike P. — Dec 31 2004 @ 9:07 am

Well, I’ve moved to shortstat because it rocks.

Now, I may just modify your script to send out e-mails. Some folks who I share data with don’t do RSS yet.

I’ll let ya know if I get it going!! Happy new year!

Comment by Simon Zirkunow — Jan 21 2005 @ 6:15 pm

Installed your script some time ago. I noticed, that sometimes I wanted to go directly to the referring page. What about adding a link to the URL in the summary section.
So you have the URL displayed and can click on it to get directly to the site.
(I tried it myself, but I failed either in browser or in my newsreader.)

Oh, I’m talking about line 71, after the Referrer: part.
Would be a nice tweak on the original script, which is great, by the way!