Code:
<?php
// require library
require "twitter.lib.php";
// twitter username / password
$username = "chrishdunne";
$password = "";
// initializing the twitter class
$twitter = new Twitter($username, $password);
// fetch my tweets / followers
$options["count"] = 3;
$xml = $twitter->getUserTimeline($options);
$twitter_status = new SimpleXMLElement($xml);
foreach($twitter_status->status as $status) {
echo ' <li class="tweet"><a href="http://www.twitter.com/chrishdunne/status/' . $status->id . '">' . $status->text . '</a></li>' . "\n";
echo ' <li class="twitter_time">on ' . $status->created_at . '</li>' . "\n";
}
// DO THIS NEXT:
// * write tweets to file ?maybe
// * control how many tweets appear on homepage using ?file ?array
?>