Adds protection to files.
The protection are for files that, when called directly, execute code, while they shouldn't. It is not intended for files that either do nothing when called directly (just function- or class-definitions), or are meant to be called directly, and therefore have proper checks on the incoming parameters.
Usage: In the file that needs protection add:
require dirname(__FILE__)."/lamer_protection.php";
If the file isn't in the same directory as "lamer_protection.php", adjust the path in the require call.