I have a simple rss reader that I am using to embed rss feeds from yahoo and others into a website. I need a coder who is well versed in vbscript specifically with asp or asp.net to provide some enhancements to the current generic script, OR provide a custom rss reader script.
This will be used to embed rss feeds info into a seperate for display in a webpage.
## Deliverables
Provide an RSS reader asp script that will allow me to embed feed inormation into a web page. The RSS reader script should have the following features:
1. specify URL of feed
1. The ability to cache the rss feed and specify the frequency for caching in days. Id probaly want to refresh once a day, so cache once a day. Also the ability to turn this feature off.
2. a method to replace the rss link for each line with a custom link.
3. a method to not only specify the number of titles to display, but the range. So for example, if an RSS feed has a total of 20 line titles I can say show 5, OR overide that and specify the range specific lines to display "6,7,8,9,10".
**DIV CONTENT**
I also attached an image file to provide an example of how the the rss info will be displayed. The following is an example of the structure of the div info:
<div class="leftcolumn">
<a href="#">Little Athens</a><br />
<a href="#">Chasing Christmas</a><br />
<a href="#">Shadow Boxer</a><br />
<a href="#">Strangers With Candy</a><br />
<a href="#">Lassie</a>
</div>
<div class="rightcolumn">
<a href="#">Little Athens</a><br />
<a href="#">Chasing Christmas</a><br />
<a href="#">Shadow Boxer</a><br />
<a href="#">Strangers With Candy</a><br />
<a href="#">Lassie</a>
</div>
**ASP SCRIPT
**<%
Option Explicit
%>
<%
Sub getXML(sourceFile)
dim styleFile
dim source, style
styleFile = [login to view URL]("[login to view URL]")
set source = [login to view URL]("[login to view URL]")
[login to view URL] = false
[login to view URL] "ServerHTTPRequest", true
[login to view URL] CStr(sourceFile)
set style = [login to view URL]("[login to view URL]")
[login to view URL] = false
[login to view URL] styleFile
[login to view URL] style, Response
set source = nothing
set style = nothing
End Sub
' Replace the link to the correct one
Call getXML("<[login to view URL]>")
%>
<%
Option Explicit
%>
<%
Sub getXML(sourceFile)
dim styleFile
dim source, style
styleFile = [login to view URL]("[login to view URL]")
set source = [login to view URL]("[login to view URL]")
[login to view URL] = false
[login to view URL] "ServerHTTPRequest", true
[login to view URL] CStr(sourceFile)
set style = [login to view URL]("[login to view URL]")
[login to view URL] = false
[login to view URL] styleFile
[login to view URL] style, Response
set source = nothing
set style = nothing
End Sub
' Replace the link to the correct one
Call getXML("<[login to view URL]>")
%>
**XSL FILE
**<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="<[login to view URL]>">
<xsl:output method="xml" encoding="iso-8859-1" omit-xml-declaration="yes" indent="yes"/>
<xsl:template match="*">
<table border="0" width="100%" align="center">
<tr>
<td valign="top" align="center" bgcolor="white">
Link
</td>
</tr>
<xsl:for-each select="//*[local-name()='item']">
<tr>
<td valign="top" bgcolor="white">
<a>
<xsl:attribute name="href">
<xsl:value-of select="*[local-name()='link']"/>
</xsl:attribute>
<xsl:attribute name="target">
<xsl:text>top</xsl:text>
</xsl:attribute>
<xsl:value-of select="*[local-name()='title']" disable-output-escaping="yes"/>
</a>
</td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
## Platform
We are running on IIS web server 5.0 on Windows 2000 SP3. classic asp is fine.