[spam-stopper] PHP4 class

Richard Williamson oldguy at oldguy.us
Tue Oct 24 03:14:27 UTC 2006


Matt wrote the Akismet plugin. Alex Potsides used the code to create 
a php5 class. Bret Kuhns converted that to a php4 class. Then I came 
along and, being a finicky kind of person, just couldn't leave well 
enough alone. :-)

Some time ago I made some changes to the php4 class. I (and others) 
have been using it in my application for a number of months. Summary 
of the changes:

* Replaced trigger_error() on fsockopen failure with a return status 
code. This allows your script to handle the error instead of having 
execution halt and your visitor seeing an ugly PHP error message. 
Disabled PHP error display before the fsockopen to prevent the PHP 
error message and re-enabled error display after the error is trapped.
* Added 'no connect' as a possible isCommentSpam() and Akismet() return status.
* Added isKeyValid() to check the status following the initial Akismet() call.
* Revised and extended comments/documentation to provide more information

See the documentation and download it at:

http://www.scripts.oldguy.us/akismet-class-doc.php

Regards,

Richard




More information about the spam-stopper mailing list