Accueil du forum » (X)HTML / CSS » Informations
________________
Carpe Diem
________________
Fabrice FOURNET (SARL CREATIVE ONLINE)
Statut:
Administrateur/Webmaster
Y a des jours comme ça mdr
________________
Carpe Diem

________________
Carpe Diem
<?
#AFP
function lit_xml($fichier,$item,$champs) {
if($chaine = @implode("",@file($fichier))) {
$tmp = preg_split("/<\/?".$item.">/",$chaine);
for($i=1;$i<sizeof($tmp)-1;$i+=1)
foreach($champs as $champ) {
$tmp2 = preg_split("/<\/?".$champ.">/",$tmp[$i]);
$tmp3[$i-1][] = utf8_decode(@$tmp2[1]);
}
return $tmp3;
}
}
$url = "http://www.afp.com/francais/rss/stories.xml";
$xml = lit_xml($url,"item",array("title","link","description"));
foreach($xml as $row) {
echo "<a href=\"".$row[1]."\" target=\"_blank\">".$row[0]."</a>\n\n".$row[2]."\n\n";
}
?>
________________
Fabrice FOURNET (SARL CREATIVE ONLINE)
Statut:
Administrateur/Webmaster
- Les conditions générales d'utilisation du site
| Sujet | Forum |
|---|---|
Sujet posté par touret le 13/11/2008 à 08h58'09 |
![]() |
Réponse postée par xerses le 09/11/2008 à 18h57'14 |
![]() |
Réponse postée par xerses le 05/11/2008 à 23h53'47 |
![]() |
Réponse postée par unit le 03/11/2008 à 15h53'53 |
![]() |
Réponse postée par froogy le 26/10/2008 à 16h40'03 |
![]() |
Réponse postée par rer le 23/10/2008 à 16h11'03 |
![]() |
Réponse postée par 1cyril le 19/10/2008 à 19h26'02 |
![]() |
Réponse postée par xerses le 13/10/2008 à 12h41'06 |
![]() |
Sujet posté par toutsi83 le 07/10/2008 à 12h33'17 |
![]() |
Sujet posté par roucroune le 03/10/2008 à 20h01'26 |
![]() |