// // available at http://www.wimpyplayer.com // // ©2002-2005 plaino // // // // // // // ///////////////////////////////////////////////////////////////// // // // INSTALLATION: // // // ///////////////////////////////////////////////////////////////// // // Upload thie file (wimpy_podcast.php to the same folder as wimpy.php. // be sure to upload the getid3 library to the wimpy folder as well. // To include a description in the Podcast listing, enter the description // information into the "comments" area of the mp3's ID3 tag. // // USE AT YOUR OWN RISK. // ///////////////////////////////////////////////////////////////// // // // CONFIGURATION: // // // ///////////////////////////////////////////////////////////////// // // Enter your name here: $wimpyPod_person = "Solution Concepts.com"; // // iTunes image // NOTE: just enter the name of the file here, and make sure that // you put the file in the same directory as this(wimpy_podcast.php) // directory. This script will automatically look for a file in the // same folder as this script with the file name that you set here: $wimpyPod_image = "coverart.jpg"; // // Enter the Title for the Podcast feed between the quotes below: $wimpyPod_title = "Words of Encouragement / Enlightenment"; // // Enter the Subtitle for the Podcast feed between the quotes below: $wimpyPod_subtitle = "from Solution Concepts.com"; // // Enter the description for your Podcast feed between the quotes below: // Example: $wimpyPod_description = "My Podcast Description"; $wimpyPod_description = "Words of Encouragement for your iPod or MP3 Player....take them with you and listen anytime."; // // Enter your contact email address here: $wimpyPod_email = "louis.williams@solutionconcepts.com"; // // Select a category: // You can see a list of iTunes categories here: // http://www.apple.com/itunes/podcasts/techspecs.html#_Toc526931698 $wimpyPod_categories = "Alternative Health"; // // Set your language: // Language codes can be found here: // http://www.w3.org/WAI/ER/IG/ert/iso639.htm $wimpyPod_language = "en-us"; // // Key words to describe stuff: // Maximum of 12 text keywords. Use commas to separate keywords. $wimpyPod_keywords = "Philosophy, Life Consulting, Chat"; // ///////////////////////////////////////////////////////////////// // // // Do not edit anything below here unless // // you really know what you are doing! // // // ///////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////// $getMyid3info = "yes"; $action = "podcast"; $authoverride = 1; //require ("wimpy_uncompressed_5.0.12.php"); require ("wimpy.php"); //$_GET['s'] = md5(session_id()); if(isset($_SERVER['PHP_SELF'])){ $domainName = "http://".$HTTP_SERVER_VARS['HTTP_HOST']; } else { $domainName = "http://".$_SERVER['HTTP_HOST']; } $theDate = date("r"); if($wimpyPod_title == ""){ $IP_title = $domainName; } else { $IP_title = $wimpyPod_title; } if($wimpyPod_subtitle == ""){ $IP_subtitle = $domainName; } else { $IP_subtitle = $wimpyPod_subtitle; } if($wimpyPod_description == ""){ $IP_description = "PodCast: ".$domainName; } else { $IP_description = $wimpyPod_description; } if($wimpyPod_categories == ""){ $IP_category = "Podcast"; } else { $IP_category = $wimpyPod_categories; } if($wimpyPod_language == ""){ $IP_language = "en-us"; } else { $IP_language = $wimpyPod_language; } if(file_exists($wimpyPod_image)){ $phpSelf = $_SERVER['PHP_SELF']; $Apathtoroot = explode("/", $phpSelf); array_pop($Apathtoroot); $pathtoroot = implode("/", $Apathtoroot); $IP_image = "http://".$_SERVER['HTTP_HOST'].$pathtoroot."/".$wimpyPod_image; $useImage = true; } else { $useImage = false; } $IP_link = $domainName; $IP_pubDate = $theDate; $IP_lastBuildDate = $theDate; $IP_docs = $domainName; $IP_generator = "Wimpy Player"; $IP_managingEditor = $wimpyPod_email; $IP_webMaster = $wimpyPod_email; function returnTime($url){ $myBaseName = array_pop(split("/", urldecode($url))); if($myTime = @date ("r", filemtime($myBaseName))){ return $myTime; } else { return date ("r"); } } $Adatasetup = explode("|", $myDataSetup); $Aitems = $podBack; $Afile = array(); /* print "
";
print_r ($podBack);
print "
"; exit; //*/ //* function escapeXMLbadChars($theString){ $retval = $theString; $retval = str_replace("&", "&", $retval); $retval = str_replace("<", "<", $retval); $retval = str_replace(">", ">", $retval); $retval = str_replace("'", "'", $retval); $retval = str_replace('"', """, $retval); $retval = str_replace('©', "©", $retval); $retval = str_replace('™', "™", $retval); return $retval; } function cleanFileName($theString){ $retval = $theString; $retval = str_replace(' ', "%20", $retval); return $retval; } function niceTimeFromSeconds($seconds){ $baseM = floor($seconds / 60); $baseS = floor((($seconds / 60) - $baseM) * 60); if($baseS < 9){ $baseS = "0".$baseS; } return ($baseM.":".$baseS); } $writeThisHeader = ""; //*/ //iso-8859-1 //UTF-8 //* array_push($Afile, '<'.urldecode("%3F").'xml version="1.0" encoding="utf-8"'.urldecode("%3F").'>'); array_push($Afile, ''); array_push($Afile, ''); array_push($Afile, "\t".'60'); array_push($Afile, "\t".''.escapeXMLbadChars(urldecode($IP_title)).''); array_push($Afile, "\t".''.escapeXMLbadChars(urldecode($IP_link)).''); array_push($Afile, "\t".''.escapeXMLbadChars(urldecode($IP_language)).''); array_push($Afile, "\t".'℗ & © '.$domainName.''); array_push($Afile, "\t".''.escapeXMLbadChars(urldecode($wimpyPod_subtitle)).''); array_push($Afile, "\t".''.escapeXMLbadChars(urldecode($wimpyPod_person)).''); array_push($Afile, "\t".''.escapeXMLbadChars(urldecode($wimpyPod_description)).''); array_push($Afile, "\t".''); array_push($Afile, "\t".' '.escapeXMLbadChars(urldecode($wimpyPod_person)).''); array_push($Afile, "\t".' '.escapeXMLbadChars(urldecode($wimpyPod_email)).''); array_push($Afile, "\t".''); if($useImage){ array_push($Afile, "\t".''); } $Acats = explode(",", $wimpyPod_categories); for($i=0;$i'); } for ($i=0; $i'); array_push($Afile, "\t"."\t"."\t".''.escapeXMLbadChars(urldecode($myInfo['title'])).''); array_push($Afile, "\t"."\t"."\t".''.escapeXMLbadChars(urldecode($wimpyPod_person)).''); array_push($Afile, "\t"."\t"."\t".''.escapeXMLbadChars(urldecode($myInfo['comments'])).''); array_push($Afile, "\t"."\t"."\t".''.escapeXMLbadChars(urldecode($myInfo['comments'])).''); array_push($Afile, "\t"."\t"."\t".''); array_push($Afile, "\t"."\t"."\t".''.cleanFileName(escapeXMLbadChars(urldecode($myInfo['filename']))).''); //array_push($Afile, "\t"."\t"."\t".''); //array_push($Afile, "\t"."\t"."\t".''.cleanFileName(escapeXMLbadChars(urldecode($myInfo['filename']))).''); array_push($Afile, "\t"."\t"."\t".''.returnTime($myInfo['filename']).''); array_push($Afile, "\t"."\t"."\t".''.niceTimeFromSeconds($myInfo['seconds']).''); array_push($Afile, "\t"."\t"."\t".''.escapeXMLbadChars(urldecode($wimpyPod_keywords)).''); // array_push($Afile, "\t"."\t".''); } } array_push($Afile, "\t".''); array_push($Afile, ''); array_push($Afile, ''); $saveFileContents = implode("\r\n", $Afile); header("Pragma: public"); header("Expires: Thu, 19 Nov 1981 08:52:00 GMT"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Content-Type: text/xml; charset=UTF-8"); print "$saveFileContents"; //*/ ?>