1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

JavaScript RSS Feed Widget Help

Discussion in 'JavaScript' started by sport302, Oct 22, 2015.

  1. #1
    Hello,

    I am looking to create a JavaScript RSS feed widget similar to FeedWind that I can host on my own web host server instead of using a third party.

    I actually like FeedWind, but I have been having issues with it crashing on a daily basis; therefore, I would like to create my own JavaScript RSS feed widget that I can be in control of.

    This is for a research project and I need real-time RSS feeds for a particular topic that can be shared on a website with others.

    I need this JavaScript RSS feed widget to do 2 things:

    1. It needs clickable title links back to the original sources. I do NOT need it to grab any content other than the title.

    2. It needs to be Responsive (Mobile Friendly).

    No fancy CSS scripting is needed, just a straight column feed of clickable title links.

    Thanks for any help...

    Chad
     
    Last edited: Oct 23, 2015
    sport302, Oct 22, 2015 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #2
    I'm not familiar with feedwind, but I'm stuck wondering how the **** Javascript could even have access to RSS in the first place unless you're working off your own feed; since cross domain policy would prevent accessing other people's feeds.

    Much less why you'd even want scripttardery to handle something better served either by a native app or server-side.

    Going server-side only would be my first step even if I had scripting involved, using something like DOMDocument in PHP to handle the parsing, with probably using either a database or local files to cache results say... daily? Hourly? Would depend on the amount of traffic and how often that RSS feed changes content.

    Really not something I'd even get JS involved in since it sounds like you want cross domain, something JS can't do on it's own. Again while unfamiliar with Feedwind I suspect they likely have their servers do just what I described so they can feed it to whatever scripttardery they have you plug into your site.
     
    deathshadow, Oct 23, 2015 IP
  3. COBOLdinosaur

    COBOLdinosaur Active Member

    Messages:
    515
    Likes Received:
    123
    Best Answers:
    11
    Trophy Points:
    95
    #3
    I've been doing what DS suggested server side for years. a correctly format RSS feed is just an XML document that is valid for DOMdocument. Allthe parser needs to do is grab the node you want and generate markup into a file that becomes an include for the pages. A CRON job keeps the feed up to date and you can set the frequency to anything you want.

    If you want constant refresh on the client side then a little javascript to use AJAX to grab the latest version is all you need. The only problem I have ever had resides with the originating sites sometimes putting out invalid feeds which is relatively easy to handle in the parser so you just keep the last good feed on file until they fix their problem.

    Acquisition just requires an http: or https: call on the server side to the link for the feed.
     
    COBOLdinosaur, Nov 17, 2015 IP