What the Duck?

When What the Duck cartoonist Aaron Johnson posted to Facebook a photo of his kids playing with the not-yet-available WTD plush toy, he did something very clever indeed.

That photo, entitled “Kid Tested, Kid Approved” appeared on my Facebook page when I next logged in and, being the die-hard fan that I am, I immediately copied and pasted it into the BrisbanePhotography.com community forum.

[Read more...]

Update: Add the What The Duck comic strip to your website using PHP

I have just updated the What The Duck PHP code for including the comic strip into any web page.

Here’s a sample for those not already familiar with this hilarious photography-oriented comic strip.

Add the What The Duck comic strip to your website using PHP

If you’d like to add the hilarious comic strip What The Duck to your website, here is a quick and easy solution using PHP.

First, we need a function that will fetch the What The Duck RSS feed and parse it into an array from which we can extract what data we want.  This function, below, is called getWhatTheDuck() .

Second, we need another function that will take that array of data and format it.  We can display just the latest comic strip or any number up to the total featured in the RSS feed.

For the purposes of this sharing of knowledge, the code will loop through the array and output everything that’s available.  It should be a simple matter to change the loop to go through only once if you only want to display the latest strip.

See the PHP code

See the PHP script in action

Download the PHP script