/    Sign up×
Community /Pin to ProfileBookmark

Parsing rss with javascript?

I was doing a bit of deisgning for my upcomming site and I was using a script which was running very slow, not because of my server, but because of the remote page it was getting some info from. I was wondering if there was a way to find the most recent entry to a rss feed and display it using javascript? Php would work fine too, I just think that may be more complex. Any help at all would be very appreacated. I did google around a bit and didn’t find much.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@A1ien51Feb 23.2007 — JavaScript can not access other domains.

Eric
Copy linkTweet thisAlerts:
@zackbloomFeb 23.2007 — There are ways around it. For example you could write a php (or any other server side languange) script that gets the file from the other domain, for example:

[code=php]
echo file_get_contents('http://www.cnn.com');
[/code]


Then just get the php file on your server from javascript.
×

Success!

Help @nicolaos spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...