Wednesday, February 20th, 2008

TwitterZoid PHP Script

It's a rather silly name, I know; however, TwitterZoid is the chosen name of my PHP script for parsing Twitter RSS feeds. I've been using Twitter quite steadily for a couple of weeks now and I thought it might be nice to include my latest tweets on my blog, so I wrote TwitterZoid to do just that.

TwitterZoid differs to other PHP based Twitter RSS parsers, at least the ones I tried before I wrote it, in that it will automatically link both lexicons and URLs found within individual tweets. It also tries to mimic Twitter's timestamping, although this could be improved.

TwitterZoid usage

I wanted to make TwitterZoid as simple to use as possible. Therefore I decided to write the script to be used as a simple include file which can be used on any PHP page. Basically, to use TwitterZoid all you need to do is set a couple of variables, include twitterzoid.php and then echo the main $TwitterZoid variable where you would like your list of tweets to appear.

Example set-up:

$twitter_username = "corenominal";
$twitter_feed = "http://twitter.com/statuses/user_timeline/99713.rss";
require_once('twitterzoid.php');

Call on the main TwitterZoid variable to produce the list of tweets:

echo $TwitterZoid;

Don't worry if this reads like gibberish, I've included an example page within the download.

TwitterZoid examples

There are currently two demonstrations of TwitterZoid in action, see:

My official "What am I doing?" Twitter page:
http://crunchbang.org/what-am-i-doing/

A more stylised version of "What am I doing?", included within the download:
http://crunchbang.org/projects/twitterzoid/demo/

Download TwitterZoid

Location: http://crunchbang.org/projects/twitterzoid/twitterzoid-0.1.tar.gz
MD5: 99dace9f9872cf1ebf93588bb2d36458

TwitterZoid license

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

http://www.gnu.org/licenses/


4 Responses to “TwitterZoid PHP Script”

  1. fiskpinnen wrote,

    I really like the fact that TwitterZoid is telling me that crunchbang-7.10.02.i386 is going to be downloaded to a computer near me very soon!

    Keep up the excellent work man!

  2. Becky wrote,

    I'm really NOT liking the fact that my fiance "Twitters" about getting naked to everyone - especially when I'm not there to scrub "His Royal Highness" ;-)

  3. Philip wrote,

    @Becky: Babe, it's hardly everyone. Besides, how do you know I didn't Twitter it hoping that you'd rush home from work to scrub my… hmm, I think I'll stop there before I get myself into more trouble =D

  4. gouki wrote,

    Heheh! Well, that made me laugh! Good day to both of you!

Add Your Comment

Use the form below to add your comment. Markdown syntax is available. Note, comments are moderated by me for spam filtering. Alternatively, feel free to contact me privately.