|
|
|
@ -1,12 +1,29 @@
|
|
|
|
|
<html>
|
|
|
|
|
w<html>
|
|
|
|
|
<body>
|
|
|
|
|
<?php
|
|
|
|
|
include("news.php");
|
|
|
|
|
include ('RssParser.php');
|
|
|
|
|
|
|
|
|
|
include("gatewayNews.php");
|
|
|
|
|
include("gatewaySources.php");
|
|
|
|
|
include ("config.php");
|
|
|
|
|
|
|
|
|
|
$parser = new RssParser();
|
|
|
|
|
$gatewayNew = new gatewayNews($con);
|
|
|
|
|
$gatewaySource = new gatewaySources($con);
|
|
|
|
|
|
|
|
|
|
$listeSources = $gatewaySource->getSources();
|
|
|
|
|
foreach($listeSources as $source){
|
|
|
|
|
echo $source;
|
|
|
|
|
$resultFlux = $parser->getResultFlux($source);
|
|
|
|
|
foreach($resultFlux as $n){
|
|
|
|
|
$gateNews->addNews($n);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
$resultFlux = $parser->getResultFlux("https://www.lemonde.fr/sciences/rss_full.xml");
|
|
|
|
|
foreach($resultFlux as $n){
|
|
|
|
|
$gateNews->addNews($n);
|
|
|
|
|
echo $n->getTitle();
|
|
|
|
|
echo "</br>";
|
|
|
|
|
echo $n->getPubdate();
|
|
|
|
@ -17,7 +34,7 @@ foreach($resultFlux as $n){
|
|
|
|
|
echo "</br>";
|
|
|
|
|
echo "</br>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
?>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|