473,804 Members | 3,822 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trouble with rss2html.asp

I am primarily a front-end designer and not familiar with ASP beyond
breaking up pages into include files. Recently, one of my freelance
clients wanted to display an RSS feed from his blog on his site. I did
some research and found the rss2html.asp script. I chose this over a
javascript solution because those scripts apparently don't affect
search engine rankings.

I implemented the script and it was running fine until about a month
ago, when the site and sometimes the server running it started to
crash. The ISP and the blog company the RSS feed originates from blame
the script. Bytescout, who wrote the script, says that it's probably
the feed that's causing the problem. The RDF version of the feed
validates as RSS, but the ATOM one has specs that are too new for the
validator to parse correctly.

I'm inclined to think that the way I implemented the script is causing
the problem. I'll post it below:

<%
' =========== RSS2HTML.ASP for ASP/ASP.NET ==========
' copyright 2005 (c) www.Bytescout.com
' =============== =============== =============== ==

' =========== configuration =============== ======
' ##### URL to RSS Feed to display #########
'URLToRSS = "http://rssnewsapps.zif fdavis.com/tech.xml"
'URLToRSS =
"http://stopyouranger.t ypepad.com/anger_in_the_ne ws/atom.xml"
'URLToRSS =
"http://stopyouranger.t ypepad.com/anger_in_the_ne ws/index.rdf"
'URLToRSS = "http://www.ajnovickgro up.com/weblog/atom.xml"
'URLToRSS = "http://www.rssmix.com/u/4592/rss.xml"
URLToRSS = "http://www.feedjumbler .com/ea511d86/rss.xml"

' ##### max number of displayed items #####
MaxNumberOfItem s = 7

' ##### Main template constants
MainTemplateHea der = "<ul class=""leftnav "">"
MainTemplateFoo ter = "</ul>"
' #####

' ##### Item template.
' ##### {LINK} will be replaced with item link
' ##### {TITLE} will be replaced with item title
' ##### {DESCRIPTION} will be replaced with item description
ItemTemplate = "<li><a href=" & """{LINK}"" " & ">{TITLE}</a></li>"

' ##### Error message that will be displayed if not items etc
ErrorMessage = "<p>Feed temporarily unavailable.<br /> Please try
again later.</p>"

' =============== =============== =============== ===

Set xmlHttp = Server.CreateOb ject("MSXML2.XM LHTTP.3.0")
xmlHttp.Open "Get", URLToRSS, false
xmlHttp.Send()
RSSXML = xmlHttp.Respons eText

Set xmlDOM = Server.CreateOb ject("MSXML2.Do mDocument.3.0")
xmlDOM.async = false
xmlDOM.LoadXml( RSSXML)

Set xmlHttp = Nothing ' clear HTTP object

Set RSSItems = xmlDOM.getEleme ntsByTagName("i tem") ' collect all
"items" from downloaded RSS
Set xmlDOM = Nothing ' clear XML

RSSItemsCount = RSSItems.Length-1

' writing Header
if RSSItemsCount > 0 then
Response.Write MainTemplateHea der
End If

j = -1

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

for each child in RSSItem.childNo des
Select case lcase(child.nod eName)
case "title"
RSStitle = child.text
case "link"
RSSlink = child.text
case "descriptio n"
RSSdescription = child.text
End Select
next

j = J+1

if J<MaxNumberOfIt ems then
ItemContent = Replace(ItemTem plate,"{LINK}", RSSlink)
ItemContent = Replace(ItemCon tent,"{TITLE}", RSSTitle)
Response.Write Replace(ItemCon tent,"{DESCRIPT ION}",RSSDescri ption)
ItemContent = ""
End if

Next

' writing Footer
if RSSItemsCount > 0 then
Response.Write MainTemplateFoo ter
else
Response.Write ErrorMessage
End If

' Response.End
%>

Can anyone tell me what's going on???

Thanks,

--keith

Aug 4 '05 #1
0 1944

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1890
by: James | last post by:
Hi I am having some trouble getting a asp page to load. Im a noob to the asp side. I have followed knowledege base Article 301305. I am running 2000 adv, IIS 5.0 I have the following settings to the folder that has the asp. Application settings
4
3848
by: Jacek Dziedzic | last post by:
Hi! First of all, I hope my problem is not too loosely tied to the "standard C++" that is the topic of this group. I have some code that exhibits a strange behaviour: on one computer, where I compile with g++-3.2 it compiles and works fine, on another computer, whether I compile with g++-3.0 or g++-2.95 (unfortunately 3.2 is not available) it crashes with a segmentation violation on runtime.
0
1565
by: Paul C | last post by:
Hello, everybody. I am having trouble running some of the VS.NET samples, specifically the CarSelector web app, which is very simple. The symptom is that the web controls (drop down listboxes and such) do not render correctly. They're almost invisible, and the others don't work at all, but just show their caption text. Not what should happen This strange behavior is happening on my new laptop, which came with XP Home, but I immediately...
0
1509
by: Alexandre Jaquet | last post by:
Hi does anybody know how to solve my trouble, when I try to create a MS Office project I always got trouble. I can't create office project when I try to create one vs.net restart ... :s
1
2007
by: Jim Bancroft | last post by:
Hi everyone, I'm running into a problem with my ASP.Net application. I've just created a new aspx page which uses some new components of mine that inherit from ServicedComponent and are designed to run under COM+. This page works fine, unless I get fancy and hit my browser's refresh button quickly, as a test. Then, what I see happen is the transactions pile up and my ASP.Net "current requests" do the same. This happens even with two...
6
3811
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for one day): \\FFDS24\ASP.NET Applications(_LM_W3SVC_1_Root_ATV2004)\Errors During Execution: 7 \\FFDS24\ASP.NET Apps v1.1.4322(_LM_W3SVC_1_Root_ATV2004)\Compilations
3
5006
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : >************************************************************************ > <WebMethod(), System.Web.Services.Protocols.SoapRpcMethod()> _ > Public Function HelloWorld() As > <System.Xml.Serialization.SoapElementAttribute("return")> String
2
1558
by: JLupear | last post by:
I am having trouble with my code again, I had prepared a question and the code to upload, however I am having trouble posting it, are there limits to the amount of lines you can post? I split it into 4 parts and am still having trouble uploading it. What am I doing wrong?
0
1680
by: mrchatgroup | last post by:
news from http://www.mrchat.net/myblog/myblog/small-accidents-mean-big-trouble-for-supercollider.html Small Accidents Mean Big Trouble for Supercollider Image Scientists expect startup glitches in the massive, complex machines they use to smash atoms.
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10577
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7620
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5521
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4299
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.