iphone app store rss failed to open

Posted by suvendu on Stack Overflow See other posts from Stack Overflow or by suvendu
Published on 2010-06-14T13:19:01Z Indexed on 2010/06/14 13:22 UTC
Read the original article Hit count: 210

Filed under:
|
|
|
|

I write this,

$opts = array( 'http' => array( 'user_agent' => 'PHP libxml agent', ) );

$context = stream_context_create($opts); libxml_set_streams_context($context);

$doc = new DOMDocument(); $doc->load("http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/toppaidapplications/limit=25/xml");

foreach ($doc->getElementsByTagName('item') as $node) {

$title = $node->getElementsByTagName('title')->item(0)->nodeValue; $desc = $node->getElementsByTagName('description')->item(0)->nodeValue; $link = $node->getElementsByTagName('link')->item(0)->nodeValue; $date = $node->getElementsByTagName('pubDate')->item(0)->nodeValue;

echo $title;

  echo '<br>';
  echo $desc;

}

?>

© Stack Overflow or respective owner

Related posts about php

Related posts about iphone