commit extjs-2.2.1
[extjs.git] / examples / feed-viewer / feed-proxy.php
1 <?php\r
2 // this is an example server-side proxy to load feeds\r
3 $feed = $_REQUEST['feed'];\r
4 if($feed != '' && strpos($feed, 'http') === 0){\r
5         header('Content-Type: text/xml');\r
6         $xml = file_get_contents($feed);\r
7         $xml = str_replace('<content:encoded>', '<content>', $xml);\r
8         $xml = str_replace('</content:encoded>', '</content>', $xml);\r
9         $xml = str_replace('</dc:creator>', '</author>', $xml);\r
10         echo str_replace('<dc:creator', '<author', $xml);\r
11         return;\r
12 }\r
13 ?>