[development] Module to Track RSS Subscribers

Khalid B kb at 2bits.com
Mon Jan 16 21:01:46 UTC 2006


By intercepting, I mean at the logging level, before we log, if the
URL is an RSS feed, then we update (or insert) a row in the new RSS
log, increment the count, and update the last access time.

So, this will only happen when an RSS feed is accessed.

1. Check that URL accessed is a feed (maybe add the hook to
node_feed(), taxonomy_*_feed()).
2. Check if a row exists for the IP address.
3. If it does, then update last access, increment access time.
4. If there is no row, then insert a new one.

Now that I think of it, IP address can be deceiving (e.g. someone
accessing stuff from office and from home will be counted as 2).

Even using the session would not solve all cases. Crawlers do not do sessions.

As far as cron is concerned, I think it will be a resource guzzler for
large sites, since it will have to do full table scans on the table.


More information about the development mailing list