Hi Paul,
there is another solution by loading “pre_system” hook. please take a reference from CodeIgnitor http://ellislab.com/codeigniter/user-guide/general/hooks.html.
in EE, you can define hooks (hook array) into the file system/expressionengine/config/hooks.php in the same way as CodeIgniter hooks are defined.
hope this would help you.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.