PHP
Place the code bellow inside your theme’s function.php file. Don’t forget to change the “TwitterProfileName” with your twitter profile name.
function parse_feed($feed) {
$stepOne = explode("<content type=\"html\">", $feed);
$stepTwo = explode("</content>", $stepOne[1]);
$tweet = $stepTwo[0];
$tweet = str_replace("<", "<", $tweet);
$tweet = str_replace(">", ">", $tweet);
return $tweet;
}
function getTweet(){
$feed = "http://search.twitter.com/search.atom?q=from:TwitterProfileName&rpp=1";
$twitterFeed = file_get_contents($feed);
echo parse_feed($twitterFeed);
}
Now wherever you like to show the twitter status just call the getTweet() function.
jQuery
$.getJSON("http://twitter.com/statuses/user_timeline/username.json?callback=?", function(data) {
$("#theIdOfTheElement").html(data[0].text);
});
Change “#theIdOfTheElement” with the ID of the element you want to show the twitter status in.

tirs, mar 9, 2010
Engelske guides, PHP/Mysql