SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict Antonbomb22's Avatar
    Join Date
    Apr 2004
    Location
    NJ
    Posts
    321
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to parse an atom feed?

    Does anyone know how to parse an atom feed in php?

    Also does anyone know how to syndicate content via an atom feed?

  2. #2
    SitePoint Enthusiast JeroenvanP's Avatar
    Join Date
    Jan 2005
    Location
    L'dam-V'burg
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not an expert, but isn't atom a lot like RSS (if not the same?) if so, read this: http://www.sitepoint.com/article/php...arsing-rss-1-0.

    And creating a feed should be easy, just get the data out of a database and use mysql_fetch_array() (or mysql_fetch_object()) and loop through it (process it row by row using a while()-statement). Put the field data in some sort of template every time you run though the loop and: you've made yourself a feed... right?

  3. #3
    SitePoint Addict Antonbomb22's Avatar
    Join Date
    Apr 2004
    Location
    NJ
    Posts
    321
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes it is but exactly what is the markup for it? such as tags etc.

  4. #4
    $this->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Dec 2003
    Location
    Federal Way, Washington (USA)
    Posts
    1,524
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For the syntax of an Atom feed, may I suggest that you check out the documentation at atomenabled.org.

    For parsing an Atom feed, here is a pretty good example.

    Hope this helps.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    Showcase your music collection on the Web

  5. #5
    SitePoint Enthusiast JeroenvanP's Avatar
    Join Date
    Jan 2005
    Location
    L'dam-V'burg
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just look at the RSS (or Atom) feeds of big websites
    Sitepoint blogs: http://www.sitepoint.com/blogs.rdf
    BBC news: http://news.bbc.co.uk/rss/newsonline...age/rss091.xml

    It should be fairly easy to make out what everything does (if I could do it, so will you ).


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
  •