Page 1 of 1

long and complex PHP/JS/AJAX/RSS question

Posted: Sat Mar 01, 2008 6:05 pm
by bobafart
how do I create a script that serves RSS headlines hosted on my server that users can cut and paste simple code to embed in their blogs/sites that outputs those RSS headlines?

My Server: creates XML


User Site: user cuts and pastes code into his/her site, something simple like:

Code: Select all

 
<script type="text/javascript" src="http://www.server.com/code.php"></script>
 
how can this be done?

Re: long and complex PHP/JS/AJAX/RSS question

Posted: Sat Mar 01, 2008 7:59 pm
by bdlang
Your script 'code.php' outputs XML. Since you can't use AJAX straight across domains, it can't be accessed via JS directly, but through a 'proxy' script on their end that opens 'code.php' and reads it like a file, returning the contents to JS to them.