Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / examples / app / feed-viewer / feed-proxy.php
diff --git a/examples/app/feed-viewer/feed-proxy.php b/examples/app/feed-viewer/feed-proxy.php
new file mode 100644 (file)
index 0000000..3d71c41
--- /dev/null
@@ -0,0 +1,12 @@
+<?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;
+}