By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,466 Members | 2,523 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,466 IT Pros & Developers. It's quick & easy.

A weird one...

P: n/a
I need to download an rss feed on a regular basis that is embedded only in
javascript (external website) and store it on my webserver's hard drive
someplace. The code goes like this:

<script language="javascript" type="text/javascript"
src="http://www.feedroll.com/rssviewer/view_rss.php?type=js&source_id=22775&feed_width=20 0&frame_color=black&title_textcolor=black&title_bg color=white&box_textcolor=black&box_bgcolor=white& feed_showborder=0&feed_spacing=2&feed_align=left&f eed_textsize=12&feed_textfont=Times
New Roman,
serif&feed_maxitems=15&feed_desclimit=&feed_compac t=1&feed_xmlbutton=0&link_openblank=1"></script>

How do I get my webserver to automatically download that output into a file
that I can then refer to in another piece of code at a later date? (I intend
to try and get the file downloaded on a rolling basis throughout the day
without having to download the output myself).

Any ideas how this can be done? Someone mentioned a little while ago that I
could put the "code" in a vbscript file and fire it on a schedule within
windows, but I've been scratching my head how to get the http data streaming
back into something resembling an include file! (I'm a newbie at vbscript).

Thanks for any help.
May 23 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

no****@invalid.invalid wrote:
I need to download an rss feed on a regular basis that is embedded only in
javascript (external website) and store it on my webserver's hard drive
someplace. The code goes like this:

<script language="javascript" type="text/javascript"
src="http://www.feedroll.com/rssviewer/view_rss.php?type=js&source_id=22775&feed_width=20 0&frame_color=black&title_textcolor=black&title_bg color=white&box_textcolor=black&box_bgcolor=white& feed_showborder=0&feed_spacing=2&feed_align=left&f eed_textsize=12&feed_textfont=Times
New Roman,
serif&feed_maxitems=15&feed_desclimit=&feed_compac t=1&feed_xmlbutton=0&link_openblank=1"></script>

How do I get my webserver to automatically download that output into a file
that I can then refer to in another piece of code at a later date? (I intend
to try and get the file downloaded on a rolling basis throughout the day
without having to download the output myself).

Any ideas how this can be done? Someone mentioned a little while ago that I
could put the "code" in a vbscript file and fire it on a schedule within
windows, but I've been scratching my head how to get the http data streaming
back into something resembling an include file! (I'm a newbie at vbscript).

Thanks for any help.


I can't quite understand why you would want to store an rss feed for
use at a later date (when it would by definition be out of date), but
here's how to get hold of it:

<%
Dim url, xmlhttp
url =
"http://www.feedroll.com/rssviewer/view_rss.php?type=js&source_id=22775"

set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send ""
ResponseWrite "<Script language=""javascript"">" & xmlhttp.ResponseText
& "</script>"
set xmlhttp = nothing
%>

If you want to write it to a file, use the Scripting.FileSystemObject -
http://www.aspfaq.com/show.asp?id=2039 - to write the
xmlhttp.ResponseText to a file.

For ideas on a number of ways to schedule the collection of the feed:
http://www.aspfaq.com/show.asp?id=2143

--
Mike Brind


That will write the contents of the feed to your page.

May 23 '06 #2

P: n/a
Mike - you're a star. Thank you so very much. That worked brilliantly!
I can't quite understand why you would want to store an rss feed for
use at a later date (when it would by definition be out of date), but
here's how to get hold of it:


The reason why I'd decided to temporarily archive a RSS, is that the page I
used it for downloads 4 RSS feeds at the same time which significantly slows
the loading of the homepage, which in my opinion isn't very user friendly.

So, I decided it would be good to only load the fresh content for a few
minutes each hour and then refer to a local "archived" copy which is less
than an hour old. That way, my users don't hit the remote RSS server so
often, the traffic on our network (intranet LAN) isn't so high and the
content is served up from a local folder rather than a remote one, which has
given the speed advantage I was looking to gain.

Cheers again.
May 24 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.