title: How to save rss feed item as single page in PHP using SimpleXML
body: <p>how to save rss feeds item as a subpage or any were in the domain using php. each item must be saved as a single page (html or php). </p>
  
  <p>below given is the php code how i pulled the xml using simpleXML. i want to know a way to save this results as of each content (items) as a page (html or php).</p>
  
  <pre><code>    &lt;?php
  
  function getFeed($feed_url) {
  
      $content = file_get_contents($feed_url);
  
      $x = new SimpleXmlElement($content);
      echo "&lt;ul&gt;";
  
      foreach($x-&gt;channel-&gt;item as $entry) {
          echo "
          &lt;li&gt;
            &lt;a href='$entry-&gt;link' title='$entry-&gt;title'&gt;" . $entry-&gt;title . "&lt;/a&gt;
            &lt;p href='$entry-&gt;link' title='$entry-&gt;title'&gt;" . $entry-&gt;{'author'} . "&lt;/p&gt;
            &lt;a href='$entry-&gt;link' title='$entry-&gt;title'&gt;" . $entry-&gt;enclosure . "&lt;/a&gt;
  
            ";
  
      echo "  &lt;/li&gt;";
          }
  
      echo "&lt;/ul&gt;";
  </code></pre>