title: Rss feed not working online
body: <p>I m working on a website which extracts news feed from my blog to the website. It workd fine in my localhost but when the content is online, the same code does not work. Here are my code.</p>
  
  <pre><code>    &lt;?php
  $i = 0; // counter
  $j=0;
  $des="";
  $url = "http://lampsoftnepal.com/?feed=rss2"; // url to parse
  $rss = simplexml_load_file($url); // XML parser
  $dater=array();
  $mylink=array();
  $mytitle=array();
  // RSS items loop
  
  print '&lt;h2&gt;&lt;img style="vertical-align: middle;" src="'.$rss-&gt;channel-&gt;image-&gt;url.'" /&gt; '.$rss-&gt;channel-&gt;title.'&lt;/h2&gt;'; // channel title + img with src
  
  foreach($rss-&gt;channel-&gt;item as $item) {
  if ($i &lt; 8) { // parse only 10 items
      //print $item-&gt;pubDate;
      $mylink[$i]=$item-&gt;link;
      $mytitle[$i]=$item-&gt;title;
      $dater[$i]=$item-&gt;pubDate;
      }
  
  
  
  $i++;
  }
  print '&lt;a href="'.$item-&gt;link[0].'" target="_blank"&gt;'.$item-&gt;title[1].'&lt;/a&gt;&lt;br /&gt;';
  
  //print $dater[1];
  
  
  ?&gt;
  </code></pre>
  
  <p>Here is the code where i want to print the date</p>
  
  <pre><code>&lt;div class="list-group"&gt; 
  
              &lt;div class="media list-group-item"&gt;
  
  
                    &lt;a class="pull-left" href="news-events.html"&gt;
                      &lt;img class="media-object" src="images/stree2.jpeg" alt="..."&gt;
                    &lt;/a&gt;
                    &lt;div class="media-body"&gt;
                        &lt;a href="news-events.html"&gt;
  
                          &lt;h4 class="list-group-item-heading"&gt;Somae's Story &lt;span class="news-date"&gt;&lt;?php echo $dater[0]; ?&gt;&lt;/span&gt;&lt;/h4&gt;
                          &lt;p class="list-group-item-text"&gt;Lorem ipsum doner mata coma, orem ipsum doner mata coma, Lorem ipsum.&lt;/p&gt;
                        &lt;/a&gt;
                  &lt;/div&gt;&lt;!-- end of media-body --&gt;
              &lt;/div&gt;&lt;!-- end of media list-group-item --&gt;
  
          &lt;/div&gt;&lt;!-- end of list-group --&gt;
  
          &lt;/div&gt;&lt;!-- end of side-box --&gt;
       &lt;/div&gt;
  </code></pre>