print xml feed to page


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php header('Content-type: text/xml');?>
  2.  
  3. <?php
  4. $location = "http://rss.news.yahoo.com/rss/topstories";
  5. print file_get_contents($location);?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.