',$text);
$text = str_replace('"','"',$text);
$text = str_replace('&','&',$text);
if ($encodage == 'utf-8') {
$text = utf8_decode($text);
}
return $text;
}
function nettoyage($description) {
$avant = array ("' 'si","''si","''si","'align=\"left\"'si","''si");
$apres = array (" "," "," ","align=\"right\""," parsefile('http://news.google.com/news?hl=en&ned=us&ie=UTF-8&q=Internet+Marketing&output=rss',15);
if (!$res) {
exit('Files rss incorrect or error during the analyse !');
}
$encode = $rss -> get_encoding();
// recupération des données sur le channel
$channel = $rss -> get_channel();
// nomber of news
$nbnews = $rss -> get_num_items();
// recup array
$items = $rss -> get_items();
// Display
echo "\n";
for($i = 0; $i < $nbnews; $i++) {
echo '- ';
if (trim($items[$i]['pubdate'])!='') {
echo '',clean_date($date),' : ';
}
if (trim($items[$i]['author'])!='') {
echo '',clean_text($items[$i]['author']),' : ';
}
elseif (trim($items[$i]['dc:creator'])!='') {
echo '',clean_text($items[$i]['dc:creator'], $encode),' : ';
}
echo '',clean_text($items[$i]['title'], $encode),'';
if (trim($items[$i]['category']) != '') {
echo '('.clean_text($items[$i]['category']).')'; }
if (trim($items[$i]['description'])!='') {
echo ' :
'.nettoyage(clean_text($items[$i]['description'], $encode));
}
echo " \n\n";
}
echo " \n";
?>
|
|