Combine RSS Feeds by Relevance
Moderator: General Moderators
Combine RSS Feeds by Relevance
Hi
does anyone know how to combine several rss feeds and sort by relevance to a few specified keywords?
Thanks
does anyone know how to combine several rss feeds and sort by relevance to a few specified keywords?
Thanks
Re: Combine RSS Feeds by Relevance
Need more information. How are you defining relevance?
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Re: Combine RSS Feeds by Relevance
If you need to combine RSS feeds, use DOMDocument->importNode. As for sorting, generating a numeric relevance key for each entry and then sorting a PHP array with that should yield the best results.
Re: Combine RSS Feeds by Relevance
How could you do the sort, once you have the rss feeds into an array, how can you sort them with the method you described?
Thanks
Thanks
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Re: Combine RSS Feeds by Relevance
array_multisort with a temporary array of relevances.
Re: Combine RSS Feeds by Relevance
Ok i have no idea how to do this could you explain in slightly more detail?
Thanks
Thanks
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Re: Combine RSS Feeds by Relevance
Iterate through each of the RSS items via DOM and assign each a numeric relevance to each of them in an associative array, looking like array($item_id => $relevance, ...). Then, asort this array. Finally, create a new DOM object, and iterate through the sorted array add the old RSS items to it.
Re: Combine RSS Feeds by Relevance
Still have no idea how to do this, but thanks for your help i will have a look through the internet, i might have to higher a freelancer to do this, how much do u think this should cost?
Thanks for your help
Thanks for your help
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Re: Combine RSS Feeds by Relevance
Not a php coder, are you?