CodeIgniter Forums
hooks - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: hooks (/showthread.php?tid=50007)



hooks - El Forum - 03-10-2012

[eluser]aeternuslibertas[/eluser]
Hi all, I want to add the visitors' ip address to my database preferably before any controller gets called, its the kind of code that seems like it should go in the index.php front controller. I think 'pre_system' hook sounds like the best approach. However I have a question, when using hooks can I call a controller from within my application, or does it have a to be a 'from-scratch' class.php file ?