Jump to content

Loading RSS feeds with AJAX


davidp

Recommended Posts

I am developing a mapping tool where the user is able to click on a country, and when the user does so, I will dynamically bring up an RSS feed associated with that country. 

 

Well, the problem is simple: AJAX doesn't allow cross-server requests.

 

Solution 1:  I could write a PHP script on my own server.  The PHP script would have to accept a GET or POST variable containing the URL of the RSS feed that I want to load.  I can then use the sockets API to open up a socket in my PHP script, make the request, wait for a response, and then send the response back from my PHP script to the client.  That is a round-about way of doing things, but it will work.

 

The thing is...I don't want to have to do that.  That just doesn't seem like the most elegant way of doing things. 

 

How would any other web page dynamically load RSS feeds contained on any arbitrary server?  Anyone have any ideas?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.