RSS feeds in PHP

后端 未结 6 756
感动是毒
感动是毒 2021-01-03 02:46

Just wondering if someone could suggest a PHP library that would allow me to read the data of an RSS feed and write it to a MySQL database. Also, if possible, provide a link

6条回答
  •  隐瞒了意图╮
    2021-01-03 03:11

    Reading data that simple is something you could use simplexml for.

    http://www.ibm.com/developerworks/library/x-simplexml.html

    From there you can see how easy it is to grab the data, instead of displaying, you store in a database.

    Gotchas: badly formatted rss (see above tut) different flavours of rss (ditto) evil values in the rss - it's foreign data and should be handled with suspicion dependency on allow_url_fopen - maybe use cURL

提交回复
热议问题