Category Archive: PHP
Posts about PHP
(More) secure PHP includes
Quick tip for securing your PHP includes, place them above your web-accessible root directory.
Display Twitter count in plain text
Twitter’s constant changes make it necessary to update techniques for otherwise simple tasks such as displaying your Twitter count via PHP.
Replace content in WordPress header.php
Here’s how to filter content in WordPress’ header.php template file using PHP.
Combine & compress CSS files with PHP
Here is another technique for combining multiple CSS stylesheets into a single, compressed file.
Combine all CSS files with PHP
Here is a simple PHP script that will combine all CSS files (stylesheets) in a given directory. Delivering one CSS file with your web pages is much faster than delivering multiple files because there are fewer HTTP requests involved.
Infinite loop trap for spammers
In this WP-Mix post, we’ll see how to send spammers on a virtual infinite loop chasing down randomly generated email addresses. It’s very satisfying.
PHP trap for bad bots
Another effective trap for bad bots and spammers, built with PHP and a slice of .htaccess.
Simple email script with PHP
Here is a simple PHP script for sending email.
Simple PHP login form
Here’s a quick PHP snippet for creating a simple login form for your site.
Spammer Trap
Another bad-bot trap to keep spammers and other scumbags away from your website.
Stop form spam with a hidden field
Sick of teh spamz? Here’s an easy way to block a lot of automated spam from your contact form.
Display PHP + server info
Quick snippet today meant as a copy/paste template for displaying your PHP and server information in the blink of an eye.