Actors News

‘,$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?sourceid=navclient&ie=UTF-8&rlz=1T4DKUS_enUS213US214&um=1&tab=wn&q=actors&output=rss’,10);

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”;

    }

    echo “

\n”;

?>