SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: Rss

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2005
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Rss

    I`ve created a simple RSS file. It works fine, but instead of displaying title and content (simple text) in the rss reader software I`d like to load a selected page with the info. How can I do so?

  2. #2
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Well firstly, this does not belong in PHP, RSS is a form of XML, but in respect to "loading a selected page with information" am I to assume you want upon loading the RSS file to redirect to a website which contains the information? If so the simple answer is you can't... well I say you can't (you probably could) but more to the point you should'nt. The whole point of RSS is to provide syndicated structure which is free of all the "bloat" and junk you get in a normal website, by trying to force open a website (The only reason I can assume you wan't to do so is for nefarious reasons) you are violating the entire point of feeds and luckily for your readers, most RSS readers are not built to be able to do that. Sorry if that is not the answer you are looking for but RSS is not an opportunity to start forcing users to your website or trying to break out of its intentional use.

  3. #3
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alex -- I think Xarr means he'd like to consume the XML on another page (using PHP) to display the content of the feed.

    Xarr -- you might want to look into the simpleXML classes to learn how to mine the feed for its data. You could load the raw feed into your script using curl

  4. #4
    SitePoint Enthusiast
    Join Date
    Nov 2005
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe I use an example.
    Here in sitepoint RSS channels works/displays like I would like them to display. In my Thunderbird (which is my reader) by clicking on one note I get not just simple Sitepoint note/article title with it`s content. I get whole Sitepoint page loaded within my reader. Page layout contains the note I wanted to see.

    Now I have simple title and content, without my page. Just plain text.
    How to define rss channel to try to load a specified page directly? No redirections from rss, just rss channel is a whole page with article, not only title and content of a massage (website layout as well).

    Please excuse me my imprecise previous post.

    Regards

  5. #5
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    What you are wanting is to inherit the design of the website correct? You would need to create a dedicated CSS stylesheet for RSS feed to accomplish this.
    Last edited by AlexDawson; May 27, 2009 at 23:03. Reason: Ninja Posted.

  6. #6
    SitePoint Enthusiast
    Join Date
    Nov 2005
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    CSS styles, but how about images which are not within css?

  7. #7
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    You can place images within RSS feeds using the <image> tag as per the RSS 2.0 specification...

    http://cyber.law.harvard.edu/rss/rss.html

    An example of which is below:

    Code XML:
     <image rdf:about="http://xml.com/universal/images/xml_tiny.gif">
       <title>XML.com</title>
       <link>http://www.xml.com</link>
       <url>http://xml.com/universal/images/xml_tiny.gif</url>
     </image>

  8. #8
    SitePoint Enthusiast
    Join Date
    Nov 2005
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I thought RSS readers just can render or load page with a provided link.

    Thanks for your replies Alex

  9. #9
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Xarr, RSS is pretty versatile, it has a lot of functionality in it. You probably just found a basic guide which only covered the general principles, unlike most tutorials the specifications are always the best place to look as they give you a complete guide to the functionality of that language.


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
  •