0

I've got several content-types based on imported RSS feeds (Feeds import, Simple Pie library).

In a Views pre render, I try to display an information stored in $row->node_feeds_item__feeds_source_config that looks like this:

a:1:{s:16:"FeedsHTTPFetcher";a:1:{s:6:"source";s:38:"http://www.as-e.be/agendas_rss/rss.xml";}}

How can I just get the http://www.as-e.be/agendas_rss/rss.xml part of that object? I have no idea how to parse that.

0

Ok, I found out a dirty solution to extract an URL from a random string text!

preg_match('#\bhttps?://[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))#', $row->node_feeds_item__feeds_source_config, $match);
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.