I'm using YQL to get a list of feeds, like this:
SELECT title, link, pubDate FROM rss
WHERE url IN ('.implode("','", array_values($urls)).')
$urls
contains the feed urls:
$urls = array(
'delicious' => 'http://feeds.delicious.com/v2/rss/foo',
'delicious' => 'http://feeds.delicious.com/v2/rss/anotherfoo',
'lastfm' => 'http://ws.audioscrobbler.com/1.0/user/foo/recenttracks.rss',
...
);
And I get an array of items with title / link / pubdate fields. Besides the "link" field, I don't get any info that might tell me from where the item comes from.
How can I include an additional field from array_keys($urls)
that corresponds to the URL (value) ? Basically I need a field that tells me from what site does the item come from, like delicious
, lastfm
etc.
For lastfm I could check with strpos
if the "last.fm" string is present in $item['url']
, but with delicious links this is not possible :(