Since Twitter became popular, many bloggers like to display recent twitter tweets on their website or blog. To display most recent twitter tweets, simply copy and paste the following code to your sidebar.php file.
<?php
// Your twitter username.
$username = "TwitterUsername";
// 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];
$tweet = str_replace(”<”, “<”, $tweet);
$tweet = str_replace(”>”, “>”, $tweet);
return $tweet;
}
$twitterFeed = file_get_contents($feed);
echo stripslashes($prefix) . parse_feed($twitterFeed) . stripslashes($suffix);
?>
Thanks the awesome code from WP Hacks.
/images/logo.png)
/images/featured.png)
/images/recentposts.gif)
/images/ico-rss.gif)
/images/cat.png)
Weiter so! Man merkt richtig, dass ihr Freude und Spaß daran habt.
I agree with the majority, but I think it still needs a but more evidence to back up your arguement, you seem to be an pro though, so will take your word
thanks for the codes.. it was helpful…
Related…
[...]just beneath, are numerous totally not related sites to ours, however, they are surely worth going over[...]…