PC Review Forums Newsgroups Microsoft Word Microsoft Frontpage Posting RSS feeds to my web site

Reply

Posting RSS feeds to my web site

 
Thread Tools Rate Thread
Old 19-10-2006, 02:38 AM   #1
=?Utf-8?B?Ym9icw==?=
Guest
 
Posts: n/a
Default Posting RSS feeds to my web site


How do I add RSS feeds from http://storageadvisors.adaptec.com/feed/ to my
Front Page 2003 web site? If an asp page is required...will I need a web
server (or IIS) with Front Page extension for the site to work? Based on
other postings...I added an asp page with the coding below...however...I
could not get it to work...please advise. Thanks! Bob

ATTEMPTED CODING FOR ASP
<%
Response.Expires = -1


FEEDSRC_RSS = "http://storageadvisors.adaptec.com/rss.xml"


MaxNumberOfItems = 10 '----------set to number of entries to show from feed


MainTemplateHeader = "<table>"
MainTemplateFooter = "</table>"


Keyword1 = "" '---------------keywords for display from feed
Keyword2 = ""


ItemTemplate = "<tr><td><a target=blank href=" & """{LINK}""" &
">{TITLE}</a><BR>{DESCRIPTION}</td></tr>"


ErrorMessage = "Data error from feed: " &FEEDSRC_RSS & "<BR><a
href=""mailto:robert_stenz@adaptec.com"">Please inform the webmaster.</a>"


Set xmlHttp = Server.CreateObject("MSXML2.XMLHTTP.3.0")
xmlHttp.Open "Get", FEEDSRC_RSS , false
xmlHttp.Send()
RSSXML = xmlHttp.ResponseText


Set xmlDOM = Server.CreateObject("MSXML2.DomDocument.3.0")
xmlDOM.async = false
xmlDOM.LoadXml(RSSXML)


Set xmlHttp = Nothing


Set RSSItems = xmlDOM.getElementsByTagName("item")
Set xmlDOM = Nothing


RSSItemsCount = RSSItems.Length-1


if RSSItemsCount > 0 then
Response.Write MainTemplateHeader
End If


j = -1


For i = 0 To RSSItemsCount
Set RSSItem = RSSItems.Item(i)


for each child in RSSItem.childNodes
Select case lcase(child.nodeName)
case "title"
RSStitle = child.text
case "link"
RSSlink = child.text
case "description"
RSSdescription = child.text
End Select
next


If (InStr(RSSTitle,Keyword1)>0) or (InStr(RSSTitle,Keyword2)>0) or
(InStr(RSSDescription,Keyword1)>0) or (InStr(RSSDescription,Keyword2)>0)
then


j = J+1


if J<MaxNumberOfItems then
ItemContent = Replace(ItemTemplate,"{LINK}",RSSlink)
ItemContent = Replace(ItemContent,"{TITLE}",RSSTitle)
Response.Write Replace(ItemContent,"{DESCRIPTION}",RSSDescription)
ItemContent = ""
End if
End If


Next


if RSSItemsCount > 0 then
Response.Write MainTemplateFooter
else
Response.Write ErrorMessage
End If


%>


  Reply With Quote
Old 19-10-2006, 10:03 AM   #2
Stefan B Rusynko
Guest
 
Posts: n/a
Default Re: Posting RSS feeds to my web site

See if below helps
http://msdn.microsoft.com/library/d...geCreateRSS.asp

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontP...53/Default.aspx
_____________________________________________


"bobs" <bobs@discussions.microsoft.com> wrote in message news:188A7B39-4047-42D8-9FE7-59A4C49AF8AC@microsoft.com...
| How do I add RSS feeds from http://storageadvisors.adaptec.com/feed/ to my
| Front Page 2003 web site? If an asp page is required...will I need a web
| server (or IIS) with Front Page extension for the site to work? Based on
| other postings...I added an asp page with the coding below...however...I
| could not get it to work...please advise. Thanks! Bob
|
| ATTEMPTED CODING FOR ASP
| <%
| Response.Expires = -1
|
|
| FEEDSRC_RSS = "http://storageadvisors.adaptec.com/rss.xml"
|
|
| MaxNumberOfItems = 10 '----------set to number of entries to show from feed
|
|
| MainTemplateHeader = "<table>"
| MainTemplateFooter = "</table>"
|
|
| Keyword1 = "" '---------------keywords for display from feed
| Keyword2 = ""
|
|
| ItemTemplate = "<tr><td><a target=blank href=" & """{LINK}""" &
| ">{TITLE}</a><BR>{DESCRIPTION}</td></tr>"
|
|
| ErrorMessage = "Data error from feed: " &FEEDSRC_RSS & "<BR><a
| href=""mailto:robert_stenz@adaptec.com"">Please inform the webmaster.</a>"
|
|
| Set xmlHttp = Server.CreateObject("MSXML2.XMLHTTP.3.0")
| xmlHttp.Open "Get", FEEDSRC_RSS , false
| xmlHttp.Send()
| RSSXML = xmlHttp.ResponseText
|
|
| Set xmlDOM = Server.CreateObject("MSXML2.DomDocument.3.0")
| xmlDOM.async = false
| xmlDOM.LoadXml(RSSXML)
|
|
| Set xmlHttp = Nothing
|
|
| Set RSSItems = xmlDOM.getElementsByTagName("item")
| Set xmlDOM = Nothing
|
|
| RSSItemsCount = RSSItems.Length-1
|
|
| if RSSItemsCount > 0 then
| Response.Write MainTemplateHeader
| End If
|
|
| j = -1
|
|
| For i = 0 To RSSItemsCount
| Set RSSItem = RSSItems.Item(i)
|
|
| for each child in RSSItem.childNodes
| Select case lcase(child.nodeName)
| case "title"
| RSStitle = child.text
| case "link"
| RSSlink = child.text
| case "description"
| RSSdescription = child.text
| End Select
| next
|
|
| If (InStr(RSSTitle,Keyword1)>0) or (InStr(RSSTitle,Keyword2)>0) or
| (InStr(RSSDescription,Keyword1)>0) or (InStr(RSSDescription,Keyword2)>0)
| then
|
|
| j = J+1
|
|
| if J<MaxNumberOfItems then
| ItemContent = Replace(ItemTemplate,"{LINK}",RSSlink)
| ItemContent = Replace(ItemContent,"{TITLE}",RSSTitle)
| Response.Write Replace(ItemContent,"{DESCRIPTION}",RSSDescription)
| ItemContent = ""
| End if
| End If
|
|
| Next
|
|
| if RSSItemsCount > 0 then
| Response.Write MainTemplateFooter
| else
| Response.Write ErrorMessage
| End If
|
|
| %>
|
|


  Reply With Quote
Old 19-10-2006, 10:09 AM   #3
Ronx
Guest
 
Posts: n/a
Default Re: Posting RSS feeds to my web site

To run an ASP page on a website you need a server that supports ASP.
Most (if not all) Windows servers with IIS support ASP, as do the few
Linux servers with iASP or CHillisoft installed.

Using IIS 6 on Windows 2003, I get the following error message:

Data error from feed: http://storageadvisors.adaptec.com/rss.xml
Please inform the webmaster.

This indicates the code should probably be OK, but may need tweaking, or
the data feed is broken.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/
http://www.rxs-enterprises.org/fp



"bobs" <bobs@discussions.microsoft.com> wrote in message
news:188A7B39-4047-42D8-9FE7-59A4C49AF8AC@microsoft.com:

> How do I add RSS feeds from http://storageadvisors.adaptec.com/feed/ to my
> Front Page 2003 web site? If an asp page is required...will I need a web
> server (or IIS) with Front Page extension for the site to work? Based on
> other postings...I added an asp page with the coding below...however...I
> could not get it to work...please advise. Thanks! Bob
>
> ATTEMPTED CODING FOR ASP
> <%
> Response.Expires = -1
>
>
> FEEDSRC_RSS = "http://storageadvisors.adaptec.com/rss.xml"
>
>
> MaxNumberOfItems = 10 '----------set to number of entries to show from feed
>
>
> MainTemplateHeader = "<table>"
> MainTemplateFooter = "</table>"
>
>
> Keyword1 = "" '---------------keywords for display from feed
> Keyword2 = ""
>
>
> ItemTemplate = "<tr><td><a target=blank href=" & """{LINK}""" &
> ">{TITLE}</a><BR>{DESCRIPTION}</td></tr>"
>
>
> ErrorMessage = "Data error from feed: " &FEEDSRC_RSS & "<BR><a
> href=""mailto:robert_stenz@adaptec.com"">Please inform the webmaster.</a>"
>
>
> Set xmlHttp = Server.CreateObject("MSXML2.XMLHTTP.3.0")
> xmlHttp.Open "Get", FEEDSRC_RSS , false
> xmlHttp.Send()
> RSSXML = xmlHttp.ResponseText
>
>
> Set xmlDOM = Server.CreateObject("MSXML2.DomDocument.3.0")
> xmlDOM.async = false
> xmlDOM.LoadXml(RSSXML)
>
>
> Set xmlHttp = Nothing
>
>
> Set RSSItems = xmlDOM.getElementsByTagName("item")
> Set xmlDOM = Nothing
>
>
> RSSItemsCount = RSSItems.Length-1
>
>
> if RSSItemsCount > 0 then
> Response.Write MainTemplateHeader
> End If
>
>
> j = -1
>
>
> For i = 0 To RSSItemsCount
> Set RSSItem = RSSItems.Item(i)
>
>
> for each child in RSSItem.childNodes
> Select case lcase(child.nodeName)
> case "title"
> RSStitle = child.text
> case "link"
> RSSlink = child.text
> case "description"
> RSSdescription = child.text
> End Select
> next
>
>
> If (InStr(RSSTitle,Keyword1)>0) or (InStr(RSSTitle,Keyword2)>0) or
> (InStr(RSSDescription,Keyword1)>0) or (InStr(RSSDescription,Keyword2)>0)
> then
>
>
> j = J+1
>
>
> if J<MaxNumberOfItems then
> ItemContent = Replace(ItemTemplate,"{LINK}",RSSlink)
> ItemContent = Replace(ItemContent,"{TITLE}",RSSTitle)
> Response.Write Replace(ItemContent,"{DESCRIPTION}",RSSDescription)
> ItemContent = ""
> End if
> End If
>
>
> Next
>
>
> if RSSItemsCount > 0 then
> Response.Write MainTemplateFooter
> else
> Response.Write ErrorMessage
> End If
>
>
> %>


  Reply With Quote
Old 19-10-2006, 07:10 PM   #4
Jon Spivey
Guest
 
Posts: n/a
Default Re: Posting RSS feeds to my web site

Hi,
I think you'd be better doing this with xslt, here's a quick and dirty
example of this feed
http://www.heresyourbook.com/feed/

With this xslt
http://www.heresyourbook.com/feed/format.xsl

Obviously you'd want to format it nicer but for jobs like this xslt is
usally a much better choice.

Cheers,
Jon

"bobs" <bobs@discussions.microsoft.com> wrote in message
news:188A7B39-4047-42D8-9FE7-59A4C49AF8AC@microsoft.com...
> How do I add RSS feeds from http://storageadvisors.adaptec.com/feed/ to my
> Front Page 2003 web site? If an asp page is required...will I need a web
> server (or IIS) with Front Page extension for the site to work? Based on
> other postings...I added an asp page with the coding below...however...I
> could not get it to work...please advise. Thanks! Bob
>
> ATTEMPTED CODING FOR ASP
> <%
> Response.Expires = -1
>
>
> FEEDSRC_RSS = "http://storageadvisors.adaptec.com/rss.xml"
>
>
> MaxNumberOfItems = 10 '----------set to number of entries to show from
> feed
>
>
> MainTemplateHeader = "<table>"
> MainTemplateFooter = "</table>"
>
>
> Keyword1 = "" '---------------keywords for display from feed
> Keyword2 = ""
>
>
> ItemTemplate = "<tr><td><a target=blank href=" & """{LINK}""" &
> ">{TITLE}</a><BR>{DESCRIPTION}</td></tr>"
>
>
> ErrorMessage = "Data error from feed: " &FEEDSRC_RSS & "<BR><a
> href=""mailto:robert_stenz@adaptec.com"">Please inform the webmaster.</a>"
>
>
> Set xmlHttp = Server.CreateObject("MSXML2.XMLHTTP.3.0")
> xmlHttp.Open "Get", FEEDSRC_RSS , false
> xmlHttp.Send()
> RSSXML = xmlHttp.ResponseText
>
>
> Set xmlDOM = Server.CreateObject("MSXML2.DomDocument.3.0")
> xmlDOM.async = false
> xmlDOM.LoadXml(RSSXML)
>
>
> Set xmlHttp = Nothing
>
>
> Set RSSItems = xmlDOM.getElementsByTagName("item")
> Set xmlDOM = Nothing
>
>
> RSSItemsCount = RSSItems.Length-1
>
>
> if RSSItemsCount > 0 then
> Response.Write MainTemplateHeader
> End If
>
>
> j = -1
>
>
> For i = 0 To RSSItemsCount
> Set RSSItem = RSSItems.Item(i)
>
>
> for each child in RSSItem.childNodes
> Select case lcase(child.nodeName)
> case "title"
> RSStitle = child.text
> case "link"
> RSSlink = child.text
> case "description"
> RSSdescription = child.text
> End Select
> next
>
>
> If (InStr(RSSTitle,Keyword1)>0) or (InStr(RSSTitle,Keyword2)>0) or
> (InStr(RSSDescription,Keyword1)>0) or (InStr(RSSDescription,Keyword2)>0)
> then
>
>
> j = J+1
>
>
> if J<MaxNumberOfItems then
> ItemContent = Replace(ItemTemplate,"{LINK}",RSSlink)
> ItemContent = Replace(ItemContent,"{TITLE}",RSSTitle)
> Response.Write Replace(ItemContent,"{DESCRIPTION}",RSSDescription)
> ItemContent = ""
> End if
> End If
>
>
> Next
>
>
> if RSSItemsCount > 0 then
> Response.Write MainTemplateFooter
> else
> Response.Write ErrorMessage
> End If
>
>
> %>
>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off