Archive for the ‘practical webmaster tips’ Category

PHP Static Methods Can Be Declared Without Static Keyword But Called Statically

Friday, September 3rd, 2010

Whenever I create a PHP class method that I intend to use statically, I declare it as …

Html Tidy fix for anchor tag - already defined in entity, line…

Wednesday, September 1st, 2010

I was having some problems with an XHTML document (that contained a named anchor tag). It was …

Zend Config XML and INI files - How to Specify False and Other Non-String PHP Data Types

Friday, August 27th, 2010

Zend Config INI and Zend Config XML are handy adaptors that allow you …

Simple PHP pretty date time now!

Saturday, July 3rd, 2010

Sometimes I just wanna print a date and time in PHP quickly. I’m forever going off to …

The Naïve Democracy and Social Justice of Bayesian Spam Filtering

Wednesday, May 26th, 2010

Project Honey Pot is a web community that gathers evidence and shares information to fight …

How to Convert a Legacy Site over to Zend Framework - 1 Favour Refactoring over Rewriting

Tuesday, May 18th, 2010

Over the years, I have often been faced with the choice of whether to refactor or rewrite.

In …

Setting the referrer in SimpleTest web tests - faking the HTTP_REFERER

Thursday, April 8th, 2010

Sometimes you might want to make a PHP web page do different things depending on the value …

A PHP secret to understanding Data Mapper Pattern in Fowler’s Patterns of Enterprise Application Architecture (PoEAA)

Tuesday, February 9th, 2010

Here’s a snippet of a Java code example in Fowler’s esteemed  book, Patterns of Enterprise Application Architecture …

How to Unit-Test for Expected Exception Thrown in Simpletest - *The* Answer

Saturday, January 16th, 2010

I keep forgetting how to assert that an Exception is going to be thrown in Simpletest version …

Prioritising URL Normalization Steps for Search Engine Optimisation of a Legacy Site

Friday, January 15th, 2010

I have skimmed through a paper on normalization techniques (by Sang Ho Lee, Sung Jin Kim, and …