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
|
<?php
require_once('ConnexionMysql.php');
mysql_select_db($base);
$requeteSQL="SELECT adresselien FROM medias";
$reponseSQL = mysql_query($requeteSQL);
$nbligne = mysql_num_rows($reponseSQL);
$resultat_xml = '<?xml version="1.0" encoding="UFT-8" ?>';
for($ligne=0; $ligne<$nbligne; $ligne++){
$resultat_xml .='<paylist>';
$rowsvideo=mysql_fetch_rows($reponseSQL);
for($cols=0; $cols<mysql_num_fields($reponseSQL); $cols++){
$resultat_xml .='<videos playe="'.mysql_fields_name($reponseSQL,$cols).'">'.uft8_encode($rowsvideo[$cols]).</video>;
}
}
$resultat_xml .='</paylist>';
mysql_free_result($reponseSQ);
echo $resultat_xml;
?> |
Partager