Author Topic: Programatically Creating Enclosures  (Read 699 times)


  • Newbie
  • Posts: 2
Programatically Creating Enclosures
« on: February 20, 2014, 07:47:53 pm »
I'm trying to automatically create podcast posts by scraping data from my SoundCloud podcast RSS feed, then using it to build the wordpress post. Getting the data and creating a wordpress post is straight forward enough. However, I'm having issues when it comes to creating the enclosure custom field.

I can't get the data to format correctly. PowerPress creates a new line for file size, format, length, and the embed code. When I add a string into the custom field, it's all one long line that PowerPress doesn't like at all.

Does anyone have any experience or advice when it comes to automatically creating the enclosure field in a way that PowerPress will understand?

I have written a more complex explanation of my problem here -
« Last Edit: February 20, 2014, 08:12:30 pm by techsupportrich »


  • Blubrry Customer Support Coordinator
  • Administrator
  • Hero Member
  • *****
  • Posts: 3319
Re: Programatically Creating Enclosures
« Reply #1 on: February 21, 2014, 08:21:29 am »
I know almost nothing about how Soundcloud does things. 

This sounds like something for a web developer to tackle. 

Blubrry offers custom development (see: and our guys might be able to come up with something for you.



  • CIO, RawVoice
  • Administrator
  • Hero Member
  • *****
  • Posts: 4483
Re: Programatically Creating Enclosures
« Reply #2 on: March 12, 2014, 02:52:49 pm »
I would check out the sourer code in this plugin for an example how to create enclosure data in the database:

Just a quick explanation, first three lines of the enclsoure field are organized by line. The 4th line is a serialized PHP array of key > value pairs, all specific meta data attributes for both itunes and powerpress. The most important would be 'duration', and the value should be in seconds.