Rev | Line | |
---|
[625] | 1 | <?php |
---|
| 2 | // this is an example server-side proxy to load feeds |
---|
| 3 | $feed = $_REQUEST['feed']; |
---|
| 4 | if($feed != '' && strpos($feed, 'http') === 0){ |
---|
| 5 | header('Content-Type: text/xml'); |
---|
| 6 | $xml = file_get_contents($feed); |
---|
| 7 | $xml = str_replace('<content:encoded>', '<content>', $xml); |
---|
| 8 | $xml = str_replace('</content:encoded>', '</content>', $xml); |
---|
| 9 | $xml = str_replace('</dc:creator>', '</author>', $xml); |
---|
| 10 | echo str_replace('<dc:creator', '<author', $xml); |
---|
| 11 | return; |
---|
| 12 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.