PHP Classes

enclosure atributes

Recommend this page to a friend!

      RSS Writer class  >  All threads  >  enclosure atributes  >  (Un) Subscribe thread alerts  
Subject:enclosure atributes
Summary:adding atrributs to the enclosure tag
Messages:2
Author:Nicolas Roma
Date:2013-06-24 16:44:12
Update:2013-06-25 05:13:40
 

  1. enclosure atributes   Reply   Report abuse  
Picture of Nicolas Roma Nicolas Roma - 2013-06-24 16:44:13
Manuel, i read on the w3 rss page that the enclosure tag works in order to add multimedia data into the feed

<enclosure url="" length="" type="" />

And also i read that this should work

<enclosure url="" length="" type="image/jpg" />

i tired to add html tag (<img/>) into the description tag but that didnt work on the facebook feed..

can you tell me how to add attributes to the encolosure tag with your scritp?

thanks for your time, sorry to boder you, i appreciate your help

  2. Re: enclosure atributes   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2013-06-25 05:13:40 - In reply to message 1 from Nicolas Roma
When you add an item you can define the enclosure property as an array of or or more enclosed files like this:

$properties['enclosure'] = array(
array(
'url'=>'http://www.somedomain.com/somefile.mp3',
'length'=>123345,
'type'=>'audio/mpeg'
)
);