Version avec modules séparés !

This commit is contained in:
Chouchen
2010-09-27 10:48:53 +00:00
parent 2861556131
commit 734e6f4829
81 changed files with 324 additions and 264 deletions

View File

@@ -0,0 +1,26 @@
<?php
if ($weather = simplexml_load_file('http://www.my-meteo.fr/meteo+rss+paris.html')){
$present_weather = $weather->channel->item[0]->title;
$future_weather1 = $weather->channel->item[1]->title;
$future_weather2 = $weather->channel->item[2]->title;
if(strpos(strtolower($present_weather),"soleil") !== false) {?>
<link rel="stylesheet" type="text/css" href="css/soleil.css">
<?}
if(strpos(strtolower($present_weather),"nuage") !== false) {?>
<link rel="stylesheet" type="text/css" href="css/nuage.css">
<?}
if(strpos(strtolower($present_weather),"peu nuageux") !== false) {?>
<link rel="stylesheet" type="text/css" href="css/peunuage.css">
<?}
if((strpos(strtolower($present_weather),"pluie") !== false) || (strpos(strtolower($present_weather),"averse") !== false)) {?>
<link rel="stylesheet" type="text/css" href="css/pluie.css">
<?}
if(strpos(strtolower($present_weather),"neige") !== false) {?>
<link rel="stylesheet" type="text/css" href="css/neige.css">
<?}
}
else
{
die ('Flux RSS non trouvé');
}
?>