'."\n"; $xml .= ''."\n"; $xml .= ''."\n"; $xml .= ''."\n"; $xml .=''.$titre.''."\n"; $xml .=''.$url.''."\n"; if($urlfacebook and $urlfacebook != 'https://' and $urlfacebook != 'http://') { $xml .=''.$urlfacebook.''."\n"; } if($urltwitter and $urltwitter != 'https://' and $urltwitter != 'http://') { $xml .=''.$urltwitter.''."\n"; } if($urlinstagram and $urlinstagram != 'https://' and $urlinstagram != 'http://') { $xml .=''.$urlinstagram.''."\n"; } $xml .=''."\n"; $xml .=''.$description.''."\n"; $xml .=''.$language.''."\n"; $xml .=''.$auteur.''."\n"; $xml .=''.$lastpubli.' GMT'."\n"; $xml .=''.$lastpubli.' GMT'."\n"; $xml .='contact@badgeek.fr (BadGeek)'."\n"; $xml .='BadGeek (https://www.badgeek.fr)'."\n"; $xml .=''.$mailauteur.''."\n"; $xml .=''.$pays.''."\n"; $xml .=''.$auteur.''."\n"; $xml .=' '.$auteur.' '.$mailauteur.''."\n"; $xml .=''."\n"; $xml .=''.$description.''."\n"; $xml .=''.$explicit.''."\n"; $xml .=''.$appleblock.''."\n"; $xml .='episodic'."\n"; $xml .=''.$titre.''."\n"; $xml .=''.$auteur.''."\n"; $xml .=''.$mailauteur.''."\n"; $xml .=''.$description.''."\n"; $xml .=''.$explicit.''."\n"; $xml .=''.$googleblock.''."\n"; $categorie = str_replace('&', '&', $categorie); $xml .= ''.$categorie.''."\n"; if(strstr($categorie, ' > ')) { $theme_add = explode(" > ", $categorie); $premiertheme = trim($theme_add[0]); $secondtheme = str_replace($premiertheme.' > ', '', $categorie); $xml .= ''."\n"; $xml .= ''."\n"; $xml .= ''."\n"; $xml .= ''."\n"; $xml .= ''."\n"; $xml .= ''."\n"; $xml .= ''."\n"; $xml .= ''."\n"; }else{ $xml .= ''."\n"; $xml .= ''."\n"; } $xml .= ''."\n"; $xml .= ''.$link.$logo.''."\n"; $xml .= ''.$titre.''."\n"; $xml .= ''.$url.''."\n"; $xml .= ''."\n"; $xml .= ''."\n"; $xml .= ''."\n"; if(is_array($array)) { // Scan des fichiers et recherche des tags for ($i = 0; $i < count($array); $i++) { $getID3 = new getID3; $tags = $getID3->analyze($dir."/".$array[$i]); if($diradd) { $mp3_url = $link.$diradd.'/'.$array[$i]; }else{ $mp3_url = $link.$array[$i]; } $mp3_poids = filesize($array[$i]); $mp3_date = date('D, d M Y H:i:s', filectime($array[$i])); setlocale(LC_TIME, "fr_FR"); $mp3_date_fr = utf8_encode(strftime("%a %d %b", strtotime($mp3_date))); getid3_lib::CopyTagsToComments($tags); $mp3_titre = cleanText($tags['comments']['title'][0]); $mp3_description = cleanText($tags['comments']['comment'][0]); $mp3_artist = cleanText($tags['comments']['artist'][0]); $mp3_duree_min = round(intval($tags['playtime_seconds'] / 60)); if($mp3_duree_min == 0) { $mp3_duree_min = "moins de 1 "; } $mp3_duree_heures = intval($tags['playtime_seconds'] / 3600); if($mp3_duree_heures < 10) { $mp3_duree_heures = "0".$mp3_duree_heures; } $mp3_duree_minutes = intval(($tags['playtime_seconds'] % 3600) / 60); if($mp3_duree_minutes < 10) { $mp3_duree_minutes = "0".$mp3_duree_minutes; } $mp3_duree_secondes = intval((($tags['playtime_seconds'] % 3600) % 60)); if($mp3_duree_secondes < 10) { $mp3_duree_secondes = "0".$mp3_duree_secondes; } $mp3_duree = $mp3_duree_heures.":".$mp3_duree_minutes.":".$mp3_duree_secondes; $permalink = filectime($array[$i]).$mp3_poids.'badgeek'.str_replace(".", "", $tags['playtime_seconds']); $mp3_numero = cleanText($tags['comments']['track_number'][0]); if($mp3_numero and !is_numeric($mp3_numero)){ $numerotationcomplete = explode("E", str_replace(' ', '', $mp3_numero)); $numerodesaison = ltrim(preg_replace("/[^0-9.]/", "", $numerotationcomplete[0]), "0"); $numerodepisode = ltrim(preg_replace("/[^0-9.]/", "", $numerotationcomplete[1]), "0"); } // Suite de la génération du XML $xml .=''."\n"; $xml .=''.$mp3_titre.' ('.$mp3_duree_min.'min)'."\n"; $xml .=''.$permalink.''."\n"; $xml .=''."\n"; $xml .=''."\n"; $xml .=''.$mp3_date.' GMT'."\n"; $xml .=''.$mp3_date_fr.''."\n"; $xml .=''."\n"; $xml .=''.$mp3_url.''."\n"; $xml .=''.$mp3_titre.' ('.$mp3_duree_min.'min)'."\n"; $xml .=''.$mp3_description.''."\n"; $xml .=''.$mp3_artist.''."\n"; $xml .=''.$appleblock.''."\n"; $xml .=''.$explicit.''."\n"; $xml .=''.$keywords.''."\n"; $xml .=''.$mp3_duree.''."\n"; $xml .='full'."\n"; $xml .=''.$mp3_description.''."\n"; if($numerodesaison and $numerodepisode) { $xml .=''.utf8_decode($numerodesaison).''."\n"; $xml .=''.utf8_decode($numerodepisode).''."\n"; } $xml .=''.$mp3_titre.' ('.$mp3_duree_min.'min)'."\n"; $xml .=''.$mp3_artist.''."\n"; $xml .=''.$mp3_description.''."\n"; $xml .=''.$explicit.''."\n"; $xml .=''.$googleblock.''."\n"; if(isset($tags['comments']['picture'][0])) { $url = $dir.'/'.$array[$i]; if($tags['comments']['picture'][0]['image_mime'] == 'image/png') { $url = str_replace('.mp3', '.png', $url); } if($tags['comments']['picture'][0]['image_mime'] == 'image/jpg') { $url = str_replace('.mp3', '.jpg', $url); } $xml .= ''."\n"; $xml .= ''.$link.'scripts/imageReturn.php?mp3='.$url.''."\n"; $xml .= ''."\n"; $xml .=''."\n"; $xml .=''."\n"; }else{ $xml .= ''."\n"; $xml .= ''.$link.$logo.''."\n"; $xml .= ''."\n"; $xml .=''."\n"; $xml .=''."\n"; } $xml .=''."\n"; $numerodesaison = ''; $numerodepisode = ''; } } if($ancienrss) { $item = 'item'; $chaine = @implode("",@file($ancienrss)); preg_match_all('#(.*)<\/item>#isU', $chaine, $items); foreach($items[0] as $item) { $xml .= str_replace('dc:creator', 'dccreator', $item); } } $xml .=''."\n"; $xml .=''; echo $xml; // Fin de la génération du XML ?>