 |
? |
Author |
Message |
fatherbojangles
Joined: 23 Mar 2006
Posts: 7
|
Posted: Wed Jun 12, 2013 4:07 pm |

|
Itunes stopped updating the podcast on June 2. I have been updating the same feed for about 5 years without a glitch. Now I can't get it to work. This error message shows up when going to the link:
$cfg["filter_method"] = "time"; // time - display item if ITEM_TIME <= CURRENT_TIME // date - display item if ITEM_TIME <= endOfDay(CURRENT_TIME) #------------------------------------------- # Script # plz, do not change anything below this line #------------------------------------------- # override RSS feed location from URL param if ($cfg['url_override'] && $_REQUEST["url"] ) $cfg["rss_feed"] = $_REQUEST["url"]; # fetch $rss = rss_fetch(); # check if (!rss_isValid($rss)) rss_error("Not a valid RSS feed"); # filter $rss = rss_filter($rss); # output Header("Content-Type: text/xml"); echo $rss; exit; function rss_fetch() { global $cfg; // DO NOT allow use file:// if (substr($cfg["rss_feed"],0, 7) == 'file://') { if (!$result) rss_error("file:// not allowed"); } // fallback to fopen if NOT remote file if (substr($cfg["rss_feed"],0, 4) != 'http') { $cfg["fetch_method"] = 'fopen'; // security check: file must be in current path or lower $root = dirname(realpath($_SERVER["SCRIPT_FILENAME"])); $feed_path = dirname(realpath($_SERVER["DOCUMENT_ROOT"]."/".$cfg ["rss_feed"])); if (substr_count($feed_path, $root) != 1) { if (file_exists($_SERVER["DOCUMENT_ROOT"]."/".$cfg["rss_feed"])) rss_error("Security violation"); else rss_error("Feed not found"); } } if ($cfg["fetch_method"] == 'fopen') { $result = @file($cfg["rss_feed"]); if (!$result) rss_error("Could not open RSS feed at ".$cfg["rss_feed"]); return join("",$result); } if ($cfg["fetch_method"] == 'curl') { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $cfg["rss_feed"]); curl_setopt($ch, CURLOPT_HEADER, 0); ob_start(); curl_exec($ch); $result = ob_get_contents(); ob_end_clean(); if (curl_errno($ch)) { rss_error("CURL Error: ".curl_error($ch)); } curl_close($ch); return $result; } } function rss_isValid($rss) { if (substr_count($rss," $v) { $id = "CDATA".rand(1, 10000000)."CDATA"; $rss = str_replace($v, $id, $rss); $cdata_array[ $id ] = $v; } # Extract all RSS items preg_match_all('/(.*?)<\/item>/is', $rss, $tmp); $rss_array = $tmp[0]; # Replace all items with ID $rss_array2 = array(); foreach($rss_array as $k => $v) { $id = "RSS".rand(1, 10000000)."RSS"; $rss = str_replace($v, $id, $rss); $rss_array2[ $id ] = $v; } $rss_array = $rss_array2; # Filter RSS News foreach($rss_array as $k => $v) { if (rss_filter2($v)) $rss_array[$k] = ''; } # Replace back foreach($rss_array as $k => $v) { $rss = str_replace($k, $v, $rss); } # Restore CDATA foreach($cdata_array as $k => $v) { $rss = str_replace($k, $v, $rss); } return $rss; } /* returns true if RSS Item should NOT be visible */ function rss_filter2($rss) { global $cfg; # Extract pubDate if (!preg_match('/(.*?)<\/pubDate>/is', $rss, $out)) return false; $pubDate = $out[1]; $pubDate_unix = strtotime($pubDate); $filterDate = time(); // If filter=date display all today items if ($cfg["filter_method"] == 'date') $filterDate = mktime( 23, 59, 59, date("m",$filterDate), date("d",$filterDate), date("Y",$filterDate) ); if ( $pubDate_unix > $filterDate) return true; return false; } function rss_error($error) { $now = date("r"); $error_text=<< Error en http:// $now $error EOF; die($error_text); } ?>
I'm at a total loss as is the guy at my server. Any thoughts?
Link to podcast is https://itunes.apple.com/us/podcast/morning-prayer-from-episcopal/id136440217?mt=2
I get the error message from http://www.episcopalchurchingarrettcounty.org/Morningprayermp3/MPdaily.php
And the link to the xml file: http://www.episcopalchurchingarrettcounty.org/Morningprayermp3/MP.xml
|
|
|
 |
 |
|
|
|