Bulk update scripts to PHP 5.4+

I’ve written a shell script to bulk update PHP pages, replacing ereg, eregi with preg_match, ereg_match with preg_match, split with preg_split and changing the $HTTP globals to their modern versions. I haven’t seen this anywhere else, so I’d thought I should post something here.

Continue reading Bulk update scripts to PHP 5.4+

Last updated on

Bachelorette, Love During War Time and Safety Not Guaranteed

A few more films over the past week: the very funny Bachelorette, a Palestinian film Love During War Time and a time-travelling drama/comedy Safety Not Guaranteed.

Love During War Time
Love During War Time

Last updated on

Using SpamAssassin Headers on cPanel

Once SpamAssassin is enabled, you can easily set an Email Filter to clear out your spam…

Filter: Any Header that matches regex "X-Spam-Score: ([2][1-9]|[3-6][0-9])"
Destination: "spam_holding_account@yourdomain"
Filter: Any Header that matches regex "X-Spam-Score: ([7-9][0-9]|[1-9][0-9]{2,})"
Destination: "Discard"

Unlike the other options shown in the email filtering, this actually does the job without freezing up. Using the score numbers (and not regex) fails when there are no SpamAssassin headers present in an email.

Last updated on