o- - - - - - start edit here // / / <~°~. // |/ °._.° define("DEBUG", false); //true = enable debug mode define("FTPSERVER", "ftp.f1gp.it"); //servername/ipadress of the fileserver define("FTPUSERNAME", "218378@aruba.it"); //ftp username define("FTPPASSWORD", "su8une"); //ftp password //---------- //xml - channel tag content $channel_title = "-F1GrandPrix.it - Radio Box"; //name of your page $channel_link = "http://www.f1grandprix.it/f12005/news.asp"; //URL to your page $channel_description = "Radiocronache, notiziari, interviste e servizi esclusivi su F1, GP2, WTCC, A1GP, Moto GP a cura di Fabrizio Corgnati, Anthony Rodella e Alessio Piana"; //description of your page $channel_language = "it-it"; //language tag $channel_copyright = "F1GrandPrix.it"; //name of the copyright-holder $channel_generator = "Design4You.it"; //if not necessary, please dont change $channel_webmaster = "info@f1grandprix.it"; //mail of the webmaster $channel_ttl = "60"; //if not necessary, please dont change $channel_man_editor = "Fabrizio Corgnati, Anthony Rodella, Alessio Piana - info@f1grandprix.it"; //name and email of the managing editor $channel_category = "Sport"; //Global category //iTunes - channel tag content $itunes_author = "Fabrizio Corgnati, Anthony Rodella, Alessio Piana"; //name of the copyright-holder $itunes_subtitle = "Radio Box by F1GrandPrix.it"; //short Podcast Subtitle $itunes_summary = "Radiocronache, interviste ed esclusive di F1 e motori"; //short Podcast Summary $itunes_name = "Radio Box by F1GrandPrix.it";//the name of your Podcast shown in itunes $itunes_email = "info@f1grandprix.it"; $itunes_explicit = "no"; // explicit content? only 'no' or 'yes' is allowed $itunes_keywords = "f1 ferrari formula 1 formula uno motori motogp, motori"; // chose up to 6 keywords, seperate by spaces //iTunes - image tag content $itunes_img_url = "http://www.f1grandprix.it/public/podcast/logopodcast.jpg"; //The URL the podcast-image should link to $itunes_img_title = "F1Grandprix.it"; //image alt text $itunes_img_link = "http://www.f1grandprix.it/public/podcast/logopodcast.jpg"; //300px x 300px Podcast cover image //iTunes - categorie tag content $itunes_category = "Sport"; //The main category within itunes $itunes_sub_category = "Motorsport"; //The sub category within itunes $linkurl = "http://www.f1gp.it/Podcast/"; //url where the mp3s can be downloaded (via http) $dirname = "Podcast"; //directory of the mp3s relative to the ftp home directory $fileext = ".mp3"; //extension of the files which should be listed (including the '.') $delimiter = '--'; //delimiter between title and description in filename (must be unique) // |\ .~°~. // \ \ <._.° // - - - -> o- - - - - - end edit here // / / <~°~. // |/ °._.° //************************************************** $mp3array = array(); if (DEBUG) { $starttime = time(); echo "

debug mode enabled


"; } //********** Set up FTP Conection if ( function_exists("ftp_ssl_connect") ) {//ftp_ssl_connect yes $ftpcon = @ftp_ssl_connect(FTPSERVER); if (DEBUG) echo "ftp-connection = ssl
"; } elseif ( function_exists("ftp_connect") ) {//ftp_ssl_connect no / ftp_connect yes $ftpcon = @ftp_connect(FTPSERVER); if (DEBUG) echo "ftp-connection = normal (no ssl)
"; } else { echo "Your php-setup does not support ftp connections."; exit(); } if ( !$ftpcon ) { echo "ftp connection error: could not reach the host"; exit(); } if ( !@ftp_login($ftpcon, FTPUSERNAME, FTPPASSWORD) ) { echo "ftp connection error: login incorrect"; @ftp_close($ftpcon); exit(); } //********** Generate File list $dirlist = ftp_nlist($ftpcon, $dirname); if (DEBUG) echo "

"; ftp_close($ftpcon); //********** Generate XML File $xmlstr = ""; $xmlstr .= "\n"; $xmlstr .= "\n"; $xmlstr .= " \n"; $xmlstr .= " $channel_title\n"; $xmlstr .= " $itunes_author\n"; $xmlstr .= " $channel_link\n"; $xmlstr .= " $channel_description\n"; $xmlstr .= " $itunes_subtitle\n"; $xmlstr .= " $itunes_summary\n"; $xmlstr .= " ".date("r")."\n"; $xmlstr .= " $channel_language\n"; $xmlstr .= " $channel_copyright\n"; $xmlstr .= " $channel_generator\n"; $xmlstr .= " $channel_webmaster\n"; $xmlstr .= " \n"; $xmlstr .= " $itunes_name\n"; $xmlstr .= " $itunes_email\n"; $xmlstr .= " \n"; $xmlstr .= " $channel_man_editor \n"; /*$xmlstr .= " \n"; $xmlstr .= " $itunes_img_url\n"; $xmlstr .= " $itunes_img_title\n"; $xmlstr .= " $channel_link\n"; $xmlstr .= " \n"; */ $xmlstr .= " $channel_title\n"; $xmlstr .= " $channel_title\n"; $xmlstr .= " $channel_category\n"; $xmlstr .= " \n"; $xmlstr .= " \n"; $xmlstr .= " \n"; $xmlstr .= " $channel_ttl\n\n"; //********** Generate XML Items for ($i=0; $i\n"; $xmlstr .= " $itunes_author\n"; $xmlstr .= " ".$linkurl.$mp3array[$i][filename]."\n"; $xmlstr .= " ".$mp3array[$i][description]."\n"; $xmlstr .= " ".$mp3array[$i][description]."\n"; $xmlstr .= " ".$mp3array[$i][pubDate]."\n"; $xmlstr .= " \n"; $xmlstr .= " ".$linkurl.$mp3array[$i][filename]."\n"; $xmlstr .= " ".$mp3array[$i][duration].""; $xmlstr .= " $channel_category\n"; $xmlstr .= " \n"; $xmlstr .= " \n"; $xmlstr .= " \n"; $xmlstr .= " $itunes_explicit\n"; $xmlstr .= " $itunes_keywords\n"; $xmlstr .= " \n\n"; } $xmlstr .= " \n"; $xmlstr .= "\n"; //********** check time for debug if (DEBUG) { $endtime = time(); $diff = $endtime-$starttime; echo "generate-time: $diff seconds"; } else { header('Content-type: text/xml', true); echo $xmlstr; } ?>