SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru rashidr's Avatar
    Join Date
    Jun 2004
    Posts
    643
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool Challenging task > How to do that

    I have different sources of rss feed. I want to use it but to filter first and randomly display on my site based on some rules and criteria.

    For eg :-

    I have 30 links for rss feed and all will get points based on the following factor :


    Points based on Words
    ___________________

    - If particular news item contains word "stock" will get 1 point.
    - If it contains word "new york" will get 2 points. etc


    Additional Points
    ______________

    - Those items which are more newer get additional 1 point.
    - Those items belongs to xyz.com gets additional 1 point.


    News Item will display according to thier points. Those which have highest points display first others will follow.

    Any idea, how to do that. Anyone have developed that kind of script. I need that script in PHP.

  2. #2
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Show us any attempted code for reading / parsing the RSS feed and we'll try help you out with any problems.

    Firstly you need to read the RSS and parse into a nice format, so that you can do teh further point parsing.

    Then simply, just regular expression matching to check if words exist, and assign points. Also, if you have 30 feeds, and you get 1 point for for being newer, does that mean only 1 feed gets that 1 point, or the newest feed with get 30, then second newest gets 29, etc.?

    -Peter

  3. #3
    SitePoint Guru rashidr's Avatar
    Join Date
    Jun 2004
    Posts
    643
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am currently using magpie rss script to display only 1 feed.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •