channel->title;
$channel['link'] = $xml->channel->link;
$channel['description'] = $xml->channel->description;
$channel['pubDate'] = $xml->channel->pubDate;
$channel['timestamp'] = strtotime($xml->channel->pubDate);
echo '
' . $channel['title'] . '
';
$cpt=0;
foreach ($xml->channel->item as $item) {
$article = array();
$article['title'] = $item->title;
$article['link'] = $item->link;
$article['pubDate'] = $item->pubDate;
$article['timestamp'] = strtotime($item->pubDate);
$article['description'] = $item->description;
$SEARCH_SUB1='
description, $SEARCH_SUB2, $pos_start);
$height=substr($item->description, $pos_start, $pos_stop - $pos_start);
$article['width']=1024;
$article['height']=$height;
$SEARCH_SUB1='src="';
$pos_start = strpos($item->description, $SEARCH_SUB1);
$pos_start += strlen($SEARCH_SUB1);
$SEARCH_SUB2="\"";
$pos_stop = strpos($item->description, $SEARCH_SUB2, $pos_start);
$article['image']=$item->mediacontent['url'];
$articles[$cpt] = $article;
echo '
';
echo '

';
echo '
';
echo '
';
echo $article['title'].' ';
echo '
';
$cpt++;
if( $cpt > $NEWS_RSS_MAX_ITEMS ) {
break;
}
}
}
echo '';
echo '';
echo '';
echo '';
echo '
';
echo '
';
echo '
';
$cpt=0;
foreach ($articles as $article ) {
$cpt_prev=$cpt-1;
$cpt_next=$cpt+1;
echo '';
echo "
\n";
echo "
";
echo "
";
$article_content = file_get_contents($article['link']);
$SEARCH_SUB1='';
$pos_start = strpos($article_content, $SEARCH_SUB1);
if(!$pos_start) {
$SEARCH_SUB1='';
$pos_start = strpos($article_content, $SEARCH_SUB1);
}
$pos_start += strlen($SEARCH_SUB1);
$SEARCH_SUB2='Lire aussi :';
$pos_stop = strpos($article_content, $SEARCH_SUB2);
if( $pos_stop ) {
$article_only = substr($article_content, $pos_start, $pos_stop - $pos_start);
}
if(!$pos_stop) {
$article_only = 'Vidéo Seulement cliquez ici';
}
$orgStrings = array( ' width="500" height="281" frameborder="0" ');
$newStrings = array( ' width="100%" frameborder="0" ');
$article_only = str_replace($orgStrings, $newStrings, $article_only);
$orgStrings = array( 'style="width: 680px"');
$newStrings = array( 'style="width: 100%"');
$article_only = str_replace($orgStrings, $newStrings, $article_only);
$orgStrings = array( '
/';
$temp = preg_replace($re, '', $article_only);
$article_only = $temp;
$re = '/
/';
$temp = preg_replace($re, ' ';
echo '
';
echo '
';
echo '
';
echo '';
echo '
';
echo '
';
echo '
';
echo '
';
echo '
';
$cpt++;
if( $cpt > $NEWS_RSS_MAX_ITEMS ) {
break;
}
}
?>