[Solved] how to show only child element with php? [closed]


  1. read interested page to string (file_get_contents, curl ) or DOMdocument / SimpleXML

  2. find interesting information in string (by RegEx or substring search) or in DOMdocument / SimpleXML (special function in DOMdocument / SimpleXML class),

  3. echo it

edit:

If you like jQuery you can use phpQuery

edit:

For bbc.com/news you can read RSS http://feeds.bbci.co.uk/news/rss.xml – it is XML file with headlines.

edit:

It seems there is BBC News API – http://api.bbcnews.appengine.co.uk/ – and you can get info in JSON

solved how to show only child element with php? [closed]