Skip to main content
Participant
October 18, 2008
Question

cffeed

  • October 18, 2008
  • 2 replies
  • 1118 views
I would like to read a feed from a URL and then loop through to display on my website. Below is my code but I get an Error running this code: Connection refused by the specified host on the specified port.

Please help. Thank you.

---------------------------------------------------------

<cffeed action="read" source=" http://rssfeeds.webmd.com/rss/rss.aspx" query="myfeed">
<cfset myfeed = REReplaceNoCase (trim(myfeed), "^[^<]*", "") />

<cfoutput query = "myfeed" maxrows="6">
<a href = "#rsslink#" target="_blank">#myfeed.title#</a> <br />

</cfoutput>
This topic has been closed for replies.

2 replies

Participating Frequently
October 20, 2008
I just tried it and it works fine (CF8.0.1). You do need to remove your second line of code as you can't use ReReplace on a query object. You should have this:
<cffeed action="read" source=" http://rssfeeds.webmd.com/rss/rss.aspx" query="myfeed">

<cfoutput query="myfeed" maxrows="6">
<a href="#myfeed.rsslink#" target="_blank">#myfeed.title#</a> <br />
</cfoutput>
BLN2020Author
Participant
October 20, 2008
...I JUST found out that my script works when accessed from a server but I was using it in a development environment locally on my computer and the connection was being refused there. Why won't this code work locally? Is there a setting I need to change in my administrator?

Thanks for everyones help.
Inspiring
October 18, 2008
> Connection
> refused by the specified host on the specified port.

Well the error kinda does explain what the problem is. Can the CF server
actually reach that URL? It would seem not.

--
Adam