VideoHelp Forum




+ Reply to Thread
Results 1 to 2 of 2
  1. 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:
    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);
    
    ?>
    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?
    Quote Quote  
  2. What about a javascript command that would download the rss file from the remote website and upload it to mine automatically?
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!