nospam@invalid.invalid wrote:[color=blue]
> 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.[/color]
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.