Category archive: php
I’ve spent the past couple of weeks at work building a web application for Snap’s latest contest and it just went live at contest.snap.com. It allows users to submit ideas (for new features for a product) and lets them do some simple Digg-style voting.
The concept is very similar to the last Snap contest but it’s now a standalone web application (instead of a half dozen hacky Wordpress plugins). The site is actually a heavily-modified version of my message board software that runs omgtru.com.
I’d been having a lot of trouble getting my Ubuntu machine to render TTFs with GD in PHP. So much trouble that I’d even tried crazy things like recompiling PHP. Luckily I found this post on excitris.com and I was able to solve all of my problems with one line of code. Since the code on their site is completely mangled, here it is:
putenv('GDFONTPATH=' . realpath('.'));
Now I can use dynamic text replacement without going insane.