Posted By

eriksmith on 11/24/10


Tagged


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

luman
verostudios
vehler


Twitter RSS Loop


 / Published in: PHP
 

  1. <?php
  2. try {
  3. $feed = 'http://twitter.com/statuses/user_timeline/41635238.rss';
  4. $xml = new SimpleXMLElement(file_get_contents($feed));
  5. for($i=0; $i < 5; $i++){
  6. print '<p class="feeditem"><a href="'.$xml->channel->item[$i]->link.'">'.ltrim($xml->channel->item[$i]->description, 'shuffleInteract:').'</a><br /><span>Posted on '.date('F jS, Y', strtotime($xml->channel->item[$i]->pubDate)).'</span></p>';
  7. }
  8. } catch(Exception $e){}
  9. ?>

Report this snippet  

You need to login to post a comment.