tvheadend/vendor/ext-3.4.1/examples/feed-viewer/feed-proxy.php
Adam Sutton bafcfff42d webui: restructure webui/extjs source files
I want to keep the 3rd-party packages away from the main source
where possible.
2013-06-03 17:11:01 +01:00

12 lines
447 B
PHP

<?php
// this is an example server-side proxy to load feeds
$feed = $_REQUEST['feed'];
if($feed != '' && strpos($feed, 'http') === 0){
header('Content-Type: text/xml');
$xml = file_get_contents($feed);
$xml = str_replace('<content:encoded>', '<content>', $xml);
$xml = str_replace('</content:encoded>', '</content>', $xml);
$xml = str_replace('</dc:creator>', '</author>', $xml);
echo str_replace('<dc:creator', '<author', $xml);
return;
}