Yeah, die(); is a bit inconvenient at times. Whenever I have die(); in a function, what I usually do is have an includes footer.php right afterwards. It works, but I don't think it's too terribly ... great. I'll try what you have suggested. I like the idea of logging the IP of potentially malicious users.
