+ Reply to Thread
Results 1 to 8 of 8

Thread: How to re-use an RSS feed?

  1. #1
    booksgo is offline x10 Sophmore booksgo is an unknown quantity at this point
    Join Date
    Apr 2008
    Posts
    109

    How to re-use an RSS feed?

    I have access to an RSS feed, (eg www.booksgo's_other_site.com/rssfeed.rss) that I want to make available at booksgo.x10hosting.com/feed.rss
    I don't want the url to re-direct, I want the feed to be imported somehow and on the x10 server at booksgo.x10hosting.com/feed.rss.
    Is that sort of thing possible, any ideas?
    Thanks
    -------------------------------------

    -------------------------------------

  2. #2
    booksgo is offline x10 Sophmore booksgo is an unknown quantity at this point
    Join Date
    Apr 2008
    Posts
    109

    Re: How to re-use an RSS feed?

    I guess the answer is No...:dunno:
    -------------------------------------

    -------------------------------------

  3. #3
    arunproff is offline x10Hosting Member arunproff is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    9

    Re: How to re-use an RSS feed?

    There are a couple of ways of doing this.

    Option 1.
    Run a cron-job on the server and call a shell script to get the file from the other site and store it in your public_html folder as feed.rss. I'm not sure if x10hosting allows wget or commands like that, but you can check.

    Or

    Option 2.
    Write a PHP/Python script which fetches and displays the RSS feed each time feed.rss is called. You can do that using a Apache .htaccess RewriteRule such that any access to feed.rss will call your script.

  4. #4
    worldwise001's Avatar
    worldwise001 is offline x10Hosting Member worldwise001 is an unknown quantity at this point
    Join Date
    Dec 2007
    Location
    Carbondale, IL
    Posts
    57

    Re: How to re-use an RSS feed?

    As far as I know, external access from x10 is not allowed, although I may be wrong.


  5. #5
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: How to re-use an RSS feed?

    First, you want to grab the other rss feed. cURL library is nice.

    PHP online manual

    Example of using cURL

    rss.php

    PHP Code:
       // create curl resource 
     
    $ch curl_init(); 

            
    // set url 
     
    curl_setopt($chCURLOPT_URL"www.booksgo's_other_site.com/rssfeed.rss"); 

            
    //return the transfer as a string 
     
    curl_setopt($chCURLOPT_RETURNTRANSFER1); 

            
    // $output contains the output string 
     
    $output curl_exec($ch); 

            
    // close curl resource to free up system resources 
     
    curl_close($ch); 

    Then you want to spit it out.

    PHP Code:
      header('Content-type: text/xml');

     echo 
    $output 
    "But that has .php extension. I want an .rss extension!" :eek4:

    Ok. Add the folowing to .htaccess in the directory of your choice so it will rewrite the incoming URL 'feed.rss' to rss.php.

    Code:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} feed.rss$ [NC]
    RewriteRule ^feed.rss$ rss.php
    </IfModule>
    Nothing is always absolutely so.

  6. #6
    booksgo is offline x10 Sophmore booksgo is an unknown quantity at this point
    Join Date
    Apr 2008
    Posts
    109

    Re: How to re-use an RSS feed?

    Thanks for your help. There was a problem with an '&', but it doesn't matter now as I've gone off the idea
    -------------------------------------

    -------------------------------------

  7. #7
    edwing2009 is offline x10Hosting Member edwing2009 is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    9

    Re: How to re-use an RSS feed?

    i have a rss feed in ajax

  8. #8
    pro1337 is offline x10Hosting Member pro1337 is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    7

    Re: How to re-use an RSS feed?

    If you need more help with php, html, Rss or eany thing else ust pm me I will help with all

+ Reply to Thread

Similar Threads

  1. Replies: 0
    Last Post: 09-11-2009, 05:53 PM
  2. My RSS feed not updating in all readers
    By RRJJMM in forum Programming Help
    Replies: 3
    Last Post: 01-31-2009, 12:54 PM
  3. Feed RSS Problem in Wordpress
    By LuciFerAngel in forum Scripts & 3rd Party Apps
    Replies: 1
    Last Post: 11-05-2008, 01:53 PM
  4. Need Help regarding RSS feed in phpbb3
    By sunils in forum Scripts & 3rd Party Apps
    Replies: 0
    Last Post: 10-30-2008, 10:39 AM
  5. Ok... I'm Feed Up Now....
    By Acehole in forum Feedback and Suggestions
    Replies: 5
    Last Post: 09-26-2007, 12:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers