[BNM] rss feeds

Joe Aliferis joe at newforms.co.uk
Thu Jul 23 18:06:46 BST 2009


An RSS validator (W3c) retuns this

This feed does not validate.

      line 11, column 13: Undefined description element: img [help]

          <description><img 
src="http://www.domain.com/makeimage.php?id=140">

So, I guess the <img> tag is not allowed inside the descrition item ?

Joe




> Yeah, totally.
> Using PHP?
>
> The biggest gotcha is to make sure that the image.php script sets the right
> Content-type header. E.g.
>
> $image_data = get_image_data_from_database_magic();
> header('Content-type: image/jpeg');
> echo $image_data;
>
> Obviously image/jpeg needs to be image/jpeg or image/png or image/gif
> depending on the format of the image.
>
> Al
>
>
> 2009/7/22 Joe Aliferis <joe at newforms.co.uk>
>
>   
>> that some sexy clever sh*t
>>
>> will it work ?
>>
>> Joe
>>
>>     
>>> A solution would be to create another script that returns an image for a
>>> given Id from the database, e.g.
>>> /image.php?image_id=3432
>>>
>>> Then in the RSS feed, you just need to insert the URLs for this new
>>>       
>> script
>>     
>>> with the image ids in place.
>>>
>>> Al
>>>
>>> 2009/7/22 Alastair James <al.james at gmail.com>
>>>
>>>
>>>       
>>>> As far as I am aware this is not possible. It *may* work on browsers
>>>>         
>> that
>>     
>>>> support the data URI scheme (
>>>>         
>> http://en.wikipedia.org/wiki/Data_URI_scheme)
>>     
>>>> but it would be far from a cross browser solution!
>>>> Al
>>>>
>>>>
>>>> 2009/7/22 Joe Aliferis <joe at newforms.co.uk>
>>>>
>>>>
>>>>         
>>>>> Not sure what you mean ?
>>>>>
>>>>> the images are stored in the DB as blob data
>>>>>
>>>>> I am trying to write a php script to output a table, that includes this
>>>>> blob field, as an RSS feed
>>>>>
>>>>> I can get everything to work but cannot work out how to include the
>>>>> image in the RSS feed
>>>>>
>>>>> Joe
>>>>>
>>>>>
>>>>>
>>>>>           
>>>>>> Joe,
>>>>>>
>>>>>> Hello. Can I ask why not just store a link to a binary image file?
>>>>>>
>>>>>> Best,
>>>>>> Andrew Gill (andrew at andrewgill.com)
>>>>>> www.ChatBadge.com
>>>>>>
>>>>>> 2009/7/22 Joe Aliferis <joe at newforms.co.uk>
>>>>>>
>>>>>>
>>>>>>
>>>>>>             
>>>>>>> Hi all
>>>>>>>
>>>>>>> does anyone know how to include binary image data from mysql database
>>>>>>> into an RSS feed ?
>>>>>>>
>>>>>>> idea is to show a thumbnail along with the text from the DB record
>>>>>>>
>>>>>>> Cheers
>>>>>>>
>>>>>>> Joe
>>>>>>> --
>>>>>>>
>>>>>>> BNM Subscribe/Unsubscribe:
>>>>>>> http://www.brightonnewmedia.org/options/bnmlist
>>>>>>>
>>>>>>> BNM powered by Wessex Networks:
>>>>>>> http://www.wessexnetworks.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>> --
>>>>>
>>>>> BNM Subscribe/Unsubscribe:
>>>>> http://www.brightonnewmedia.org/options/bnmlist
>>>>>
>>>>> BNM powered by Wessex Networks:
>>>>> http://www.wessexnetworks.com
>>>>>
>>>>>
>>>>>           
>>>> --
>>>> Dr Alastair James
>>>> CTO James Publishing Ltd.
>>>> http://www.linkedin.com/pub/3/914/163
>>>>
>>>> www.worldreviewer.com
>>>> WINNER Yahoo! Finds of the Year 2007
>>>> WINNER Travolution Awards Best New Online Travel Company 2008
>>>> WINNER Travel Weekly Magellan Award 2008
>>>> WINNER IRHAS Awards, Los Angeles, Best Travel Website 2008
>>>> SPECIAL MENTION: AOP Awards 2008
>>>>
>>>> "In a market increasingly crowded with new content and experience-led
>>>> sites, Worldreviewer stands out a mile. It has used exclusive
>>>> editorial and excellent tools to wonderful effect and ensured its
>>>> commercial partnerships are relevant to the target market."
>>>>
>>>> Blog: onewheeledbicycle.com
>>>>
>>>> "Noli nothis permittere te terere!"
>>>>
>>>>
>>>>         
>>>
>>>
>>>       
>> --
>>
>> BNM Subscribe/Unsubscribe:
>> http://www.brightonnewmedia.org/options/bnmlist
>>
>> BNM powered by Wessex Networks:
>> http://www.wessexnetworks.com
>>
>>     
>
>
>
>   



More information about the BNMlist mailing list. Powered by Wessex Networks