SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2006
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Best Way to Integrate RSS

    What is the best way to integrate RSS into a website.

    From what I have read so far, the options are

    1)Javascript
    2) PHP

    It seems like Javascript is simply one line of code?

    Is it really this simple? What are the advantages of the PHP RSS integration?

    Am I missing something?

  2. #2
    SitePoint Evangelist
    Join Date
    Apr 2006
    Location
    Halifax, Canada
    Posts
    498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you trying to create an RSS feed from your site, or include another RSS feed in your site?

    By "integrate" i assume the latter, and it may be available through one line of code by a flash widget or something, but you probably want to go with a server side solution for a number of reasons. If this is the case, you need to find a RSS reader library for the language that your server uses, and make it parse the feeds you want and display them how you want. If you take this approach, it will take you more than one line of code.
    Paul Butler.org
    JSSpamBlock - Reduce WordPress spam.

  3. #3
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    (spdrus, how nice of you to ask me on another thread - here's my answer to your question, both here and there)

    Since it appears you want to take an existing RSS feed and convert it to plain text that the visitor can see, you're best off using a server-side programming language (such as ASP, JSP, Perl or PHP) rather than JavaScript.

    Why? Because first off, search engines can have a hard time reading JavaScript content. Second, if a browser does not support JavaScript (Lynx for example) or the user has it turned off (out of fear that the JavaScript boogeyman is going to hijack their computer, muwhahahahahahahahaha) then nobody's going to see the contents of the feed. A server-side programming language (again, such as PHP) can take the feed from one server, save it to the server it is running on, convert (or "parse") that copy to plain HTML and send it to the browser whenever it is requested. That way, all the browser sees is plain HTML code. And because it's plain HTML, it's accessible to EVERYONE, regardless of what they use. If they can get to your Web site, they can see your feed.

    Now if you want to CREATE an RSS feed, you have two options. Write it out by hand (it's an XML file, so you can make one in any text editor, such as Notepad or win32pad), or use a server-side programming language (see above for examples) to write it for you automatically.

    Which brings me to my question. Which one do you need? Do you need an RSS feed parsed into HTML content, or do you want a feed you can syndicate to other sites?

  4. #4
    SitePoint Enthusiast
    Join Date
    Oct 2006
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does parsing into html mean that is will be a .html or will it be a php? I am not sure what parsing is.

  5. #5
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The output will be HTML. The file itself would be written in PHP.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •