I would like to include a feed in posts on my site from a remote site, ie http://www.example.com/rss.xml . Unfortunately the script I am using requires fopen( , which my host does not support. I can, however, use an xml file that is on my local domain, ie /home/xxx/xxx/mysite/forum/rss.xml . How can I read the remote rss file and then insert it into an rss file on my site? I tried this and saved it as news.php:
However the newsfeeder I put it into doesn't like the ?> at the end, so I gues I need to output it to a new rss.xml file or something. Any ideas guys?Code:<? if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2')) { header ('Cache-Control: no-cache, pre-check=0, post-check=0, max-age=0'); } else { header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0'); } header ('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT'); header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header ('Content-Type: text/xml'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.autoblog.com/rss.xml"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); ?>
+ Reply to Thread
Results 1 to 2 of 2
-
-
What about a javascript command that would download the rss file from the remote website and upload it to mine automatically?
Similar Threads
-
Little problem-Cutting Scenes-Ideas?
By n3ur0 in forum Newbie / General discussionsReplies: 1Last Post: 17th Mar 2010, 08:44 -
Forum RSS not working
By ChrissyBoy in forum FeedbackReplies: 5Last Post: 24th Feb 2010, 12:01 -
Wireless video feed to laptop? Any ideas?
By gravinus in forum Newbie / General discussionsReplies: 6Last Post: 11th Jan 2009, 08:04 -
Forum in RSS feed?
By mats.hogberg in forum FeedbackReplies: 0Last Post: 25th Oct 2007, 09:24 -
RSS gone?
By mats.hogberg in forum FeedbackReplies: 2Last Post: 16th Aug 2007, 03:16