Category

PHP


Access Pages Without the PHP Extension Using .htaccess

February 2, 2012

There are a number of ways to make “clean URLs” work on your site, but this one is pretty straight forward.  It allows you to access /any-page.php by simply going to /any-page.  Just place the following into your .htaccess file (and make sure that mod_rewrite is enabled): Continue »

The SimpleImage Class for PHP

November 15, 2011

If you love working with PHP but hate the GD library, you’ll love the Simple Image PHP class we’re releasing today. This class takes the headache out of dealing with images and features over 25 useful methods. Continue »

A Simple PHP CAPTCHA Script

January 16, 2011

This is one of the easiest CAPTCHA scripts you will ever use. While it doesn’t obscure the text, it will serve its purpose well for many people who need a low-level CAPTCHA solution. This script requires little-to-no setup. The only dependency is the PHP GD library. Continue »

Tips for Supporting UTF-8 in Your PHP5 Applications

July 6, 2010

Here are some great tips that will help any PHP5 developer support UTF-8 in their applications.  This list isn’t comprehensive, but it will allow you to do most basic operations while avoiding troublesome character encoding issues. Continue »

Sending Plain-text + HTML Emails in PHP

April 18, 2010

You can easily add some basic headers and send HTML emails using the PHP mail() function, but sometimes the resulting messages don’t seem to display correctly in certain email clients — especially those that don’t support HTML emails.  The best thing to do is send both a plain-text version and an HTML version of your Continue »

Facebook Speeds up PHP with HipHop

February 2, 2010

PHP is by far my favorite server-side scripting language, so it comes as no surprise that I’m really excited about HipHop for PHP.  HipHop was developed over at Facebook and serves as a means to speed up code execution and reduce server demand.  From the Facebook Developer Blog: Continue »

Compressing CSS with PHP

November 11, 2009

Here is a short PHP function that removes comments and whitespace from your CSS.  If you happen to be generating your stylesheet dynamically, try wrapping this around the output to reduce the overall size. Continue »

Calculating Age with PHP

November 10, 2009

You would think that determining a person’s age would be a very simple task for a PHP developer.  However, when I asked this question for myself I found a variety of solutions that people posted online.  Many of them used large functions with conditionals and other logic that was hard to follow.  After a significant Continue »

Enabling TinyMCE’s PHP Spell Checker

August 5, 2009

Learn how to implement the PHP Spell Checker plugin in TinyMCE. Continue »

PHP Functions to Get and Remove the File Extension from a String

March 11, 2009

Two useful PHP functions to handle file names and extensions. Continue »