-
loadRss( $url ) ;
foreach( $rss->item as $item ){
if ($feed_count >= $MAX_feed) {
break;
}
{
$feed_count++;
$title = $item->title ;
$link = $item->link ;
$description = $item->description ;
foreach( array( "pubDate" , "date_timestamp" , "dc:date" , "published" , "issued" ) as $time )
{
if( isset( $item->{ $time } ) && !empty( $item->{ $time } ) )
{
$timestamp = ( is_int( $item->{ $time } ) ) ? $item->{ $time } : strtotime( $item->{ $time } ) ;
break ;
}
}
if( !isset( $timestamp ) )
{
$timestamp = time() ;
}
echo '
- ' . date( "Y/m/d" , $timestamp ) . ' ' . mb_strimwidth($title, 0, 45, "...", utf8) . '' . ' '; } } ?>