I have a table with IP/DNS data for banned visitors. I want this check to be done before anything else, but after the model for banned IPs is loaded.
What is the best place to add this code and make it run every time a page is accessed, taking into account that it should load a view for the 403 error to be displayed for banned visitors?
The banned visitors model is loaded globally (specified in autoload.php). Now, I only need to make the function that verifies if the visitor is banned global. Can this be done using hooks? What do you recommend?