Many of my scripts are designed to interact with included files or as subsets of other scripts. In most cases, output is unpredictable unless these scripts are "included" with their cohort. This simple statement, inserted at the top line of the script, protects against standalone execution. Instead it loads the home page.
[code]
<?php // DO NOT RUN THIS SCRIPT STANDALONE
if (count(get_included_files()) < 2) {
header("HTTP/1.1 301 Moved Permanently");
header("Location: /");
exit();
}
?>
[code]
A damaged image generator (class) for validating text.
CAPTCHA - Completely Automated Public Turing test to tell Computers and Humans Apart Categories : PHP , PHP Classes , Security , GD image library , Security Function to generate readable/remeberable random password Categories : PHP , Security , Security Protect your email links from being spidered by spam email robots! Categories : PHP , Security , Mail , Email Encoding data using PGP via PHP's proc_* functions Categories : Cryptography , Security , Email , PHP , PGP Creates a CAPTCHA image in PHP, which displays 5 numbers stored in a session. Categories : PHP , GD image library , Form Processing , Security Dollar Serial Number Validator Categories : PHP , Security , Algorithms send_mail function to defeat Header Injection Hacking/Spamming Categories : PHP , Email , Form Processing , Security IPTables Bandwidth statics Categories : PHP , Security , Network Random Password Generator Categories : PHP , Strings , Security Passgen: Automatically generate mixed case alpha numeric passwords Categories : PHP , Security A very simple PHP single password cookie based login without usernames. Categories : PHP , Cookies , Security , Beginner Guides Generating and Matching Secure and Strong Password Hash Categories : PHP , PHP Classes , Cryptography , Security PHP Cookies - Simple cookie write/read methods that allow basic encryption Categories : PHP , Cookies , Security , Encryption Forms protected from XSS attacks (FOPAXSS) Categories : PHP , PHP Classes , Form Processing , Security Authenticator for Exchange Server LDAP Categories : PHP , Authentication , LDAP , Security , Sessions