Using Akismet to Detect Spam Email

PHP 1 Comment

After seeing the effectiveness of the Akisment WordPress plug-in at filtering out spam comments here, I decided to see if I could use it in conjunction with a email contact form. I thought it might be interesting to some of my readers (there are at least a couple) to keep a sort of journal here of what I do to accomplish that, plus it might help encourage me to finish it.

So the first thing I've done is to create an Akismet class that can take the pertinent data, contact the Akismet server via cURL and send it that data, and then return the response as a boolean (true == spam, false == not spam).

Read the rest...

PHP4 Is Dead; Long Live PHP5…

General 2 Comments

...at least until PHP6 is released.

As stated in the php.net release notes, "Support for PHP 4 has been discontinued since 2007-12-31. Please consider upgrading to PHP 5.2. The release below is the last PHP 4 release." The news archive also notes, "This release wraps up all the outstanding patches for the PHP 4.4 series, and is therefore the last normal PHP 4.4 release. If necessary, releases to address security issues could be made until 2008-08-08," (my emphasis).

While I've often tried to create general-purpose functions and applications that could port to either PHP4 or PHP5, I've decided to forego any further support of PHP4 with any code I create (unless, of course, someone is paying me to create something for PHP4 for some reason). I would therefore like to encourage my fellow PHP hackers (in the good sense) to join me in encouraging all developers to move on to PHP5, and explain to all clients and hosting services that they should migrate to PHP5 ASAP, if for no other reason than to ensure that they can continue to operate with the most secure version of PHP by keeping up with the latest stable releases.

But this upgrade is also to our benefit, opening up access to the much more thorough class and object support of PHP5, enhanced database interfaces such as MySQLi, and new functions like filter_var(), just to name a few of the benefits. Additionally, we should strive to rid our applications of deprecated features and functions, in particular those that will not be supported at all in PHP6. (We don't want to have to upgrade our scripts again, right?) According to Nathan A. Good in "The Future of PHP", the following features will be completely removed from PHP6:

If your scripts depend upon any of those settings, it's time to wean yourself of them now. Don't wait until someone upgrades a server and all your scripts start crashing.