Skip to main content
2 of 2
Adding note about hook possibilities.
Greg
  • 649
  • 4
  • 10

Surely you could use PHP's get_headers() function?

http://php.net/manual/en/function.get-headers.php

The first element in the array returned will be the response code. If it contains '403' then Drupal returned an "access denied" page.

I'm not sure where the best place to call it would be. Probably hook_exit(), depending on your needs:

http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_exit/6

Greg
  • 649
  • 4
  • 10