4 Replies Latest reply on Oct 20, 2008 5:00 PM by Newsgroup_User

    cffeed

    reggiejackson88
      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>
        • 1. Re: cffeed
          Level 7
          > 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
          • 2. Re: cffeed
            John Whish
            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>
            • 3. Re: cffeed
              reggiejackson88 Level 1
              ...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.
              • 4. Re: cffeed
                Level 7
                > ...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?

                Your local firewall?

                --
                Adam