Hehe, never thought this old articles would be revived.
Its failing because it cannot find the font file. I guess I should have mentioned about it and not assume everyone knows how imagettftext() works.
Back in step 0, i guess because for some reason I have this code before step 1, where I define the variables you need to give relative path for font file you want to use for $font = . You can either copy it from your OS fonts directory or download them from any other fonts sites like
www.1001freefonts.com/