Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Having searched and searched, I've been unable to find any module which will give me an idea of how many pages a user has viewed over a selected time period.

Q: Why would I want to know?

A: We have a premium content site on which we've seen some trial users blasting through thousands of pages faster than they could read or print them. We have suspicions that they might have their own bot which is grabbing every thing it can. In any case, we only notice this by spot checks.

So I've decided to start on a module to alert us to possible screen scraping.

Q: How are you going to go about it?

A: Use the accesslog, users table and variable_get('cron_last') to show the page/<insert time increment here> of users in decreasing order to see at a glance any suspicious activity. Also email administrator(s) when defined threshedhold is breached.

Q: What will be configurable?

A: Not limited to:

  • Select by role
  • since last cron run
  • arbitrary from/to dates/times
  • what time scale to measure (per minute, hour, day)
  • what threshold should cause an email to be sent
  • email address(es) for notification
  • email title
  • email prefix text
  • email suffix text
  • email from address (default to site admin's address)

Any input, advice, criticism, suggested modules I've overlooked, etc, would be greatly appreciated.

Project Information