identi.ca feed plugin
Tuesday, July 8th, 20081 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | <? $limitToShow = 10; $xmlcontent = ""; $xfh = fopen("http://identi.ca/evolmachine/rss", "r"); while( !feof($xfh) ) { $xmlcontent .= fread( $xfh, 128 ); } fclose( $xfh ); $feedArr = array(); $xml = simplexml_load_string( $xmlcontent ); foreach ( $xml->item as $item ) { $feedItem['title'] = (string) $item->title; $feedItem['link'] = (string) $item->link; $feedItem['description'] = (string) $item->description; $feedItem['date'] = (string) $item->date; array_push( $feedArr, $feedItem ); }?> <ul> <? $count = 0; foreach( $feedArr as $item ) { if( $count < $limitToShow ) { ?> <li><a href="<?=$item['link'];?>"><?=$item['title'];?></a></li> <? $count+=1; } } ?> </ul> |
you do need php compiled with simplexml for this script to work. All you need then is to include this where you want your identi.ca feed to show up!

