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($ch, CURLOPT_URL, "www.booksgo's_other_site.com/rssfeed.rss");
//return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// $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>