Welcome to the blog of Jeremy Cook, a Guelph, Ontario based web developer specialising in PHP. Find out more information about me or how to contact me.
Conference Time
I've been pretty bad about blogging in the last few months, something I hope to rectify over the next few months. A combination of a heavy workload, learning to drive (finally!), buying a house and a big freelance project has taken all of my time. I have a few things...
Read More Some More PDO Weirdness
I've said before that I'm a great fan of PDO and use it wherever possible. That said there are some annoying quirks in it, one of which I encountered today. I'll outline what I was trying to do, what I expected to happen and what actually happened. I'm also curious...
Read More Getting Started with PHPUnit
I haven't written here for ages. Things have been slightly quiet on the interesting work front and life has also got in the way. Anyway, I recently started work on some larger projects and have a few ideas on what to blog about from that. One of the projects is...
Read More Creative Switching
The switch statement is one of the basic control structures in PHP and many other languages. At its simplest it can be used to quickly 'choose' between a series of different values but with a little imagination it can do much more than that. I find it extremely easy to...
Read More Some tricks with Autoloaders
Autoloaders are a great feature of PHP5. Used properly they can help to really 'clean up' your code, negating the need for include or require statements. They can also lead to a real increase in performance as class files are only loaded and parsed when needed (lazy loading) instead of...
Read More Using Zend_Service_Twitter and OAuth
I've just spent all afternoon trying to update a very simple Twitter client to post status updates to Twitter. The code has been using BASIC authentication to post Tweets until now but seeing as that's about to be discontinued in favour of OAuth I thought I'd better update things. I...
Read More Recursive Closures in PHP 5.3
With the release of PHP 5.3.3 the other day and the announcement of the end of active support for the PHP 5.2 branch I thought it would be a good time to do a bit more experimenting with the new features in PHP 5.3. I would have done this sooner...
Read More Creating 50,000 unique values
A client at work wants to run a promotion where a customer will receive a card with a unique 8 digit code on it when they buy something. They will then be able to visit the website to find out if they are a winner or to get a chance...
Read More Google Custom Search Engine
I recently published my first class on PHPClasses and thought I would write a brief post about it here. The class allows a developer to send a query to a Google Site Search custom search engine, using the XML API.
Google Site Search
Google Site Search can be used to create a...
Read More Installing Imagick under Apache on Windows
After a few weeks of experimenting on and off I've just managed to get the Imagick extension installed under Apache on Windows (my development environment). While discovering how to make it work was not at all simple the final process of getting all the pieces to...
Read More 