PHP: Capture RSS feed


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

AJAX by default only lets you play within your own Domain.com but there are plenty of times where you want to use someone else's feed. Check out http://snipplr.com/view/12466/jquery-parse-rss-feed/ to understand the rest.


Copy this code and paste it in your HTML
  1. <?php
  2. if (!isset($_REQUEST["url"])) exit;
  3.  
  4. $url = $_REQUEST["url"];
  5. if (substr($url, -0, 7) != "http://") exit;
  6.  
  7. echo file_get_contents($url);
  8. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.