groups

name language licence
WORDPRESS ALIGN PHP BSD
AS3: STREAMING MP3 PLAYER USING FLASH MEDIA SERVER 2 PHP BSD
Display Most Recent Twitter Entry PHP BSD
WORDPRESS: IF IN CATEGORY PHP BSD
Display Categories in Drop-Down Box PHP BSD
Display Categories PHP BSD
Display Gravatars (WordPress 2.5+ Only) PHP BSD
last.fm PHP BSD

< 1 2 3 4 5 6 7 8 9 >



language: PHP
licence: BSD

Display Most Recent Twitter Entry

options: view full snippetsend to code collector
Display Most Recent Twitter Entry

<?php
// Your twitter username.
$username = "pulsewidthmod";
// Prefix - some text you want displayed before your latest tweet.
// (HTML is OK, but be sure to escape quotes with backslashes: for example href=\"link.html\")
$prefix = "";
// Suffix - some text you want display after your latest tweet. (Same rules as the prefix.)
$suffix = "";
$feed = "http://search.twitter.com/search.atom?q=from:" . $username . "&rpp=1";
function parse_feed($feed) {
$stepOne = explode("<content type=\"html\">", $feed);
$stepTwo = explode("</content>", $stepOne[1]);
$tweet = $stepTwo[0];
	
(Continues...)