Twimage Release

UPDATE: Since Twitter has now ditched RSS feeds as part of their careful plan to make using their service increasingly difficult for anybody that doesn’t want to use their clients, Twimage no longer works. At all. Sorry!

Ever since I joined Twitter, it always bothered me that there was no way to display my tweets in a controlled web environment, one that didn’t allow scripts or embedded Flash content. Twitter offers plenty of badges in Flash and Javascript, but if I wanted to display my latest tweet in, say, my forum signature, I was basically screwed. Most forum software such as phpBB is very restrictive on what users can and cannot put into their signatures, but the one thing they all allow are images. And so Twimage was born.

Twimage is a PHP script I wrote that grabs your Twitter account’s RSS feed, reads it, strips it down, and then prints the latest tweet from it to a 648 x 40 pixel PNG image. You can then display this image anywhere you would normally be able to put a regular PNG image file – including your forum signature! The final result looks a lot like this (resized for width, see full size here):

Twimage

Because Twitter’s RSS feeds are painfully unstable – often returning HTTP 400 errors for no fucking reason whatsoever – I’ve also included a Twimage Feedchecker. This is nothing more than a simple PHP file which tries to print your RSS feed in plaintext, and will helpfully tell you any errors it encounters so you can accurately troubleshoot. I’ve also included the source file for the background image, if the colours I’ve chosen don’t take your fancy.

I’m not going to lie: this script is basically a complete and total hackjob and is very, very rudimentary in nature. RSS2HTML does most of the heavy lifting, and I just polish it, clean it up and print it into a PNG. It’s nothing that somebody else couldn’t write for themselves in about ten seconds, and indeed if anybody out there wishes to improve on it (which shouldn’t be hard!) I welcome them. I’d love to see what you do with it. Enjoy.

Published by

Tim

Absolute dickhead with no business being Online

4 thoughts on “Twimage Release”

  1. And, of course, as soon as I make this post, the RSS feed starts giving bad HTTP returns. THANKS TWITTER YOU ARE SOLID GOLD

  2. Looks pretty cool Tim, definitely see this being useful as a WordPress or phpBB mod. Or yet another badge some “web 2.0” company slaps on their frontpage to show how hip they are.

  3. I understood all the words. Their particular combination reveals nothing to me, but I assure you I am impressed.

    As I take one more pit stop along the winding road of elderly technophobia I glare near-sightedly with a mixture of wonderment and suspicion at your strange and arcane ways. Technomage, you are a spectacle.

  4. Dan: Perhaps as a phpBB mod! There are already far more Flash-y (if you’ll pardon the pun) ways of badging your tweets. Mine is the Ford Model T to their Lambourghini. Still! I built it!

    Jimi: Recent changes to Technomage legislation require certain, uh, “donations”, or “levies”, uh… just give me your wallet.

Comments are closed.