slyi wrote:
Thanks fox. Your answer was most useful, i do know a bit of php and
have the server access
But i was hoping that someone knew of a service available on the web
for this
As this could be a workaround for the x-site scripting restrictions
client side RSS.
if you have the bandwidth for it -- or want to get involved in
"subscriptions" for the service (or free if the demand is not high),
then the easiest thing to do is use the php to generate a *.js file from
the rss feed as illustrated.
One way is to set *.js files to be pre-processed by php by adding the
file type to .htaccess:
AddType application/x-httpd-php .js
users would directly access the php disguised as js served from your domain.
[**i'm pretty sure you can simply use <script src=myscript.php... just
as easily without messing with htaccess]
<script
src="http://yourdomain.com/scripts/rss.js?feed=http://somedomain.com/rss.xml"
type=text/javascript></script>
//-------rss.js:
<?
if(isset($_REQUEST) && isset($_REQUEST["feed"]))
{
$contents = file_get_contents($feed);
$contents = preg_replace("/\r|\f/","",$contents);
}
?>
var rss = "<?=addslashes(preg_replace("/\n/","\\n",$contents));?>";
// -------end rss.js
[ a lot of people don't realize that .js files can be passed
location.search (aka, GET) data just like any other URL ]
Add some parsing functions and your ready to serve RSS via JS yourself.
I'm not familiar with x-site, so I really couldn't make any further
recommendations about possible workarounds.
fox