Bonjour,

J'ai un fichier php pour créer un flux rss, je souhaite créer à partir de ce fichier un autre fichier mais csv ou tout au moins transformer mon actuel fichier rss en csv automatiquement.

Je n'ai pas trouver grand chose sur la toile à par ces 2 liens :

http://stackoverflow.com/questions/8...o-csv-with-php

https://github.com/bcantoni/rss-to-csv (implique une action donc pas automatique)

Mon flux est sous cette forme :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
require_once('../includes/func.php');
 
if ...{
    ...
}
else{
 
header("Content-type: text/xml; charset=utf-8");
?>
<rss version="2.0"  xmlns:g="http://base.google.com/ns/1.0">
<channel>
<title>.....</title>
<description>.....</description>
<link>....</link>
<pubDate>...</pubDate>
<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="...." type="application/rss+xml" />
<?php
 
    if ($resultRSS){
        foreach ( $resultRSS as $row ){
.........
 
            ?>
.....
            <item>
                <title><![CDATA[.....]]></title>
                <link>....</link>
                <description><![CDATA[.... ]]></description>
                <g:google_product_category>....</g:google_product_category>
                <g:condition>...</g:condition>
                <g:shipping>
            <g:country>....</g:country>
            <g:service>......</g:service>
            <g:price>......</g:price>
          </g:shipping>
          <g:brand>.....</g:brand>
          <g:mpn>.....</g:mpn>
                <g:id>.....</g:id>
                <g:availability>...</g:availability>
                <g:price>....</g:price>
                <g:phone>....</g:phone>
          <g:product_type>.....</g:product_type>
            </item>
<?php }?>     
            <?php
        }
    }
$ocdb->closeDB();
?>
 </channel>
</rss>
 
<?php
 
}//if else
 
?>
Toute aide même petite est la bienvenue..