1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| <?php
require('configuration.php');
$sql = connect_sql();
header ("Content-Type: text / xml; charset = utf-8");
$xml = '<playlist version="1" xmlns="http://xspf.org/ns/0/">';
$xml.= '<title></title>';
$xml.= '<trackList>';
mysql_query("SET NAMES utf8");
$select_morceau = "SELECT * FROM morceaux_groupe ORDER BY vote_groupe DESC";
$result_morceau = mysql_query($select_morceau) or die ('Erreur : '.mysql_error() );
while($affiche_morceau = mysql_fetch_array($result_morceau))
{
$xml.= '<track>';
$xml.= '<location>mp3/'.$affiche_morceau["numero"].'.mp3</location>';
$xml.= '<creator></creator>';
$xml.= '<album></album>';
$xml.= '<title>'.$affiche_morceau["titre"].'</title>';
$xml.= '</track>';
}
$xml.= '</trackList>';
$xml.= '</playlist>';
echo $xml;
?> |