Posts in PHP

Sunday, October 16, 2005

PHP PCRE Cheat Sheet

phpguru.org - PCRE Cheat Sheet:

Inspired by the great stuff at ilovejackdaniels.com, here’s a dedicated PCRE cheat sheet. The PHP cheat sheet at ILoveJackDaniels is fine enough, but PCRE goes way beyond what is there. Hence, this. Enjoy.

This is a handy little sheet. Print it out and tack it to your cubicle, code monkey!

Posted in PHP by funkatron on 10/16 at 12:13 PM
(0) CommentsPost a comment

Saturday, September 24, 2005

Bad Behavior

I’ve been getting a lot of comment spam lately, so I’ve installed Bad Behavior, which takes a different approach to spam blocking:

Bad Behavior was designed and built by watching actual spambots which harvested email addresses, posted comment spam, and used fake referrers. By logging their entire HTTP requests and comparing them to HTTP requests of legitimate users, it is possible to detect most spambots.

Let me know if you have any problems. I’ll post some impressions after I’ve used it a bit.

Posted in InfoSec, PHP by funkatron on 09/24 at 08:21 AM
(0) CommentsPost a comment

Wednesday, August 17, 2005

MarsEdit and Wordpress 1.5.2

monkeybite.jpgIt seems that many of the problems that MarsEdit users ran into with Wordpress have been solved in the 1.5.2 upgrade. I’m actually using this post to test those reports.

Update: yep, the slashed quotes problem and the image uploading problem have both been fixed.


Posted in The Web Problem, PHP by funkatron on 08/17 at 08:22 PM
(0) CommentsPost a comment

Saturday, July 09, 2005

The super-best comment spam plugin for wordpress ever: Spam Karma

Spam Karma

Holy Crap. This is the best anti-spam plugin for Wordpress EVAR. I was using Fahim Farook’s Blacklist, but Spam Karma is much more powerful and sophisticated. Woot!

Posted in The Web Problem, PHP by funkatron on 07/09 at 06:36 PM
(10) CommentsPost a comment

Wednesday, June 29, 2005

A very annoying Wordpress bug, and a fix

#1355 (General category always assigned) - WordPress Trac - Trac

So basically, whenever you post with an external client, no matter what categories you select, your default category is ALSO assigned. This is particularly annoying when you use your category in your nicely formatted URLs, because the default cat is often the one that gets used (I guess because it’s the first one encountered in the DB query), and pings sent out when you post will reference and URL with the default cat in it. Removing the default cat from that post will then result in “not found” errors.

This problem was first reported in April. I’m kind of bummed that a couple releases have gone by with no one taking a couple minutes to patch the code. For now, I’m doing it manually, but if another release comes out without it and I have to do some diff/patching shit, I’ll be very annoyed.

Rarr!

Update: The patching directions in the forum thread are a little misleading, as the new 1.5.1.3 version of xmlrpc.php has changed a lot, so line numbers are quite different. Here’s what I did to get it working.

Old:

620   } else {
621     $post_category[] = $post_default_category;
622   }

New:

620   } elseif (!$post_category) {
621     $post_category[] = $post_default_category;
622   }
Posted in The Web Problem, PHP by funkatron on 06/29 at 09:14 AM
(0) CommentsPost a comment
Page 14 of 18 pages « First  <  12 13 14 15 16 >  Last »