Revision: 39561
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at January 18, 2011 09:44 by nielsenrc
Initial Code
print "<br />"; $feed = file_get_contents('http://twitter.com/statuses/user_timeline/25556798.rss'); $xml = new SimpleXMLElement($feed); $i = 0; foreach ($xml->channel->item as $feed) { $patterns = array(); $patterns[0] = '/00:00:00/'; $patterns[1] = '/-0500/'; $patterns[2] = '/-0400/'; $patterns[3] = '/ParadigmRoofing:/'; $replacements = array(); $replacements[0] = ' '; $replacements[1] = ' '; $replacements[2] = ' '; $replacements[3] = ' '; $cleanedtitle = preg_replace($patterns, $replacements, $feed->title); echo '<h2><a href=' . $feed->link . '>' . $cleanedtitle . '</a></h2>' . '<br />'; $i++; if($i == 3) { break; } }
Initial URL
Initial Description
Initial Title
Twitter RSS Feed
Initial Tags
Initial Language
PHP