Revision: 35885
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at November 15, 2010 02:45 by laurentzziu
Initial Code
<?php // Your twitter username. $username = "TwitterUsername"; $prefix = "<h2>My last Tweet</h2>"; $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); ?>
Initial URL
Initial Description
Initial Title
Wordpress Last Twitter Entry
Initial Tags
wordpress, twitter
Initial Language
PHP