SitePoint Sponsor

User Tag List

Results 1 to 12 of 12

Thread: RSS and images

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    RSS and images

    I have done some reading about RSS. So i understand the basics of it.

    My question is if it is any way to add images(like jpg, gif) to "<item>" tag. I would like to distribute news with pictures.

  2. #2
    SitePoint Guru marcel's Avatar
    Join Date
    Nov 2000
    Posts
    920
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice question

    You can add a common logo to the feed.
    If you were to send the actual data within each image, some readers might see it. "some" that's the problem since most expect text.

    To get the data in the image use
    $contents = implode("",@file( $filename ) );

    throw it in the <item>$contents</item> tag

    Then see it it explodes. hehe

    http://www.enchantedceiling.com/rss
    distributes sky pics if your interested in any way...

    My two cents

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What about inserting <img src="http://something.com/image.gif"> into:

    <item>
    <description>
    Some text<br>
    <img src="http://something.com/image.
    gif">
    <br>
    </description>
    </item>

    Is this good practise?

  4. #4
    SitePoint Guru marcel's Avatar
    Join Date
    Nov 2000
    Posts
    920
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    RSS already has a field reserved for the logo representing the RSS feed.

    Download the latest version of FeedReader
    http://feedreader.com

    Then add http://slashdot.org/slashdot.rss
    and http://diarist.com/rss.php

    You need to look at the structure of RSS 1.0 or RSS 2.0 . I use 1.0 on Diarist.com.

    the description should not be in the <item>, but that information could...

  5. #5
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What i want to do is distribute product pictures with some informations(like description of the product ).
    My plan was to use XML to do this, but then i heard about RSS and now i try to figure out if there is some way to do it.

    Another thing that is important, that i have to make some easy parsing way for non technical webmasters(like inserting simple JavaScript on their page).

    Now im confused and cannot decide what to do.

  6. #6
    SitePoint Enthusiast Bilal's Avatar
    Join Date
    Oct 2002
    Location
    Planet Bob
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Same problem with me!!!!!!
    Best Regards,
    Bilal

  7. #7
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Umm... What you really need I suppose is an example RDF file so you can base your RSS file on this yes ?

    With IMGs... I'll see what I can find

  8. #8
    SitePoint Enthusiast Bilal's Avatar
    Join Date
    Oct 2002
    Location
    Planet Bob
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My problem is now solve.....
    Best Regards,
    Bilal

  9. #9
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, let us all know how you solved it then


  10. #10
    SitePoint Guru marcel's Avatar
    Join Date
    Nov 2000
    Posts
    920
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Indeed... tell us.

    Is it like --> http://www.enchantedceiling.com/rss
    Last edited by marcel; Aug 6, 2003 at 13:44.

  11. #11
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got this

    PHP Code:
    The XML page cannot be displayed 
    Cannot view XML input using XSL style sheet
    Please correct the error and then click the Refresh button, or try again later


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

    Reference to undefined entity 'eacute'Error processing resource 'http://www.enchantedceiling.com/rss'Line 29Position 42 

      
    <dc:subject>The skies over Chihuahua M&eacute;xico</dc:subject>
    -----------------------------------------^ 

  12. #12
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To me, looks like you have illegal entity in that file yes ? Umm...

    Maybe a DTD will sort it out for you ?


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
  •