PHP parsing rss/rdf

Discussion in 'PHP' started by ianlufc, Nov 26, 2007.

  1. #1
    Hi guys

    i have been pulling my hair out recnently trying to do this and wondering if Anyone can help...

    I'm trying to write php code that will

    1. Take in RSS feeds (from 1 or many sites, 1 will do for now)
    2. Parse the rss feed
    3. output it as HTML (not too important)
    4. *tricky bit* i then want to save each each item belonging to the feed as an rdf triple in rdf file format. basically one file with rdf extension that holds all the subject predicate and objects....

    again trying to do this in PHP so if anyone has any help ir code id really appreciate it.

    Ian
     
    ianlufc, Nov 26, 2007 IP
  2. matthewrobertbell

    matthewrobertbell Peon

    Messages:
    781
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This is your friend for parsing rss feeds.
     
    matthewrobertbell, Nov 26, 2007 IP
  3. ianlufc

    ianlufc Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yeah i came across magpie and apparently is great server side but i dont think it will output rdf triples for me, basically im trying to have a .rdf as output from a parser.
     
    ianlufc, Nov 26, 2007 IP
  4. matthewrobertbell

    matthewrobertbell Peon

    Messages:
    781
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You need to find out the syntax of RDF, then use magpie to get all of the info from the rss feed, then put the right information in the right places.
     
    matthewrobertbell, Nov 26, 2007 IP
  5. ianlufc

    ianlufc Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    ok i thought it was for simple parsing il have a look into that, also its for a college project so its better to have the code to do it, but sure theres no point in rewriting the wheel!

    cheers mate
     
    ianlufc, Nov 26, 2007 IP
  6. ianlufc

    ianlufc Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    anymore ideas,
    ideally some code e.g. one or 2 php files?
     
    ianlufc, Nov 26, 2007 IP
  7. matthewrobertbell

    matthewrobertbell Peon

    Messages:
    781
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #7
    This wikipedia page has some examples of RDF files. I suggest you look up the basics of php if you don't already know them.
     
    matthewrobertbell, Nov 26, 2007 IP
  8. ianlufc

    ianlufc Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    ah i know the basics but outputting rdf models from rss feeds aint basic...il have a look at magpie

    cheers mate
     
    ianlufc, Nov 27, 2007 IP