Parse RSS XML Feed in ASP

' exact URL of the RSS XML file you are wanting to parse

Dim objHTTP 'call object remotely
Dim RSSURL,RSSFeed 'set variables for RSS feed
Dim xmlRSSFeed 'set XML data into DOM object
Dim objItems,objItem, objChild 'temp variables to get various information
Dim title,description,link, pubdate 'variables that you are getting
Dim display 'This is the output variable

'convert raw XML to workable data
Set objHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP") "GET",RSSURL,false
RSSFeed = objHTTP.responseText

'load raw XML data into an object
Set xmlRSSFeed = Server.CreateObject("MSXML2.DomDocument.4.0")
xmlRSSFeed.async = false

'clear objHTTP: No longer needed
Set objHTTP = Nothing

'This is where you get the information you are wanting
'When writing, I was using the following XML source:
' this code grabs all the "items" in the RSS Feed
Set objItems = xmlRSSFeed.getElementsByTagName("item")

'clear xmlRSSFeed: No longer needed
Set xmlRSSFeed = Nothing

' loop over all the items in the RSS Feed
For x = 0 to objItems.length - 1
' this code places the content from the various RSS nodes into local variables
Set objItem = objItems.item(x)
For Each objChild in objItem.childNodes
Select Case LCase(objChild.nodeName)
Case "title"
title = objChild.text
Case "link"
link = objChild.text
Case "description"
description = objChild.text
Case "pubdate" 'Note: pubDate in XML: Needs to be lowercase to work
pubDate = objChild.text
End Select
'This is where the display for each occurence is constructed
display = display & "<a href=""" & link & """>" & title & "</a><br />" & pubDate & "<br />" & description & "<br /><br />"


Google SMTP Information

SMTP Server:
Port: 465
SMTP Connection Timeout: 60
SMTP Authentication: 1
Send Username: [email protected]
Send Password: **password**

** = Your actual account information

CDO SendMail Script

email = "[email protected]"
'check for email address...
if (email <> "") then 'need an email addy

Set Mail = Server.CreateObject("CDO.Message")

Mail.Configuration.Fields.Item ("") = 2 'Send the message using the network (SMTP over the network).
Mail.Configuration.Fields.Item ("") = "" 'SMTP link to your server
Mail.Configuration.Fields.Item ("") = ***Port ID*** 'SMTP Port
Mail.Configuration.Fields.Item ("") = 1 'Use SSL for the connection
Mail.Configuration.Fields.Item ("") = 60

Mail.Configuration.Fields.Item ("") = 1 'basic (clear-text) authentication
Mail.Configuration.Fields.Item ("") = "[email protected]" 'email account actually sent from
Mail.Configuration.Fields.Item ("") = "password" 'password for email account from above


Mail.From = "[email protected]" 'email you want it to be sent from

Mail.To = "[email protected]" 'email you want it sent to

Mail.HTMLBody = "Body Content Goes Here" 'content ofemail

Mail.Subject = "Subject" 'subject of email

On Error Resume Next

if Err <> 0 Then
Response.Write "<font color=red size=+1>An error occurred while sending the email....</font>"
response.write("Thank you.") 'Thank you for sending email
end if 'error
response.write("No Email submitted. Please try again") 'Need email to send to to process
end if 'need an email


Apache Server Info

if you put the following in /etc/apache2/http.conf
<Location /server-status>
SetHandler server-status
Order deny,allow
Allow from
ExtendedStatus On