long and complex PHP/JS/AJAX/RSS question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bobafart
Forum Newbie
Posts: 8
Joined: Thu Feb 28, 2008 2:31 pm

long and complex PHP/JS/AJAX/RSS question

Post 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?
bdlang
Forum Contributor
Posts: 395
Joined: Tue May 16, 2006 8:46 pm
Location: Ventura, CA US

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

Post 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.
Post Reply