webhead2 Posted March 31, 2009 Share Posted March 31, 2009 Hello, There is an RSS feed that I am trying to copy to my server. I am trying to get the entire feed, not just updates. The problem is when I copy it, it only contains the most recent stuff. I added the feed to my Google home page and it has over 80,000 entries. $remote_url = "http://www.xvideos.com/rss/rss.xml"; $handle = file_get_contents($remote_url); $f=@fopen("cache/xvideo_rss.xml","w+"); fwrite($f,$handle); Is there a way that PHP can read in the entire feed? Is there a way to download the feed and save to a file via web browser? (not view) thanks! Link to comment https://forums.phpfreaks.com/topic/151989-reading-rss-with-php/ Share on other sites More sharing options...
premiso Posted March 31, 2009 Share Posted March 31, 2009 Are you closing the with fclose ? As far as I can tell it should. You may want to use curl to fetch the feed as that tends to be quicker and possible more reliable. Also a note, for anyone trying to help, the url goes to pr0n, so be wary at work/school etc. Link to comment https://forums.phpfreaks.com/topic/151989-reading-rss-with-php/#findComment-798181 Share on other sites More sharing options...
webhead2 Posted March 31, 2009 Author Share Posted March 31, 2009 Are you closing the with fclose ? As far as I can tell it should. You may want to use curl to fetch the feed as that tends to be quicker and possible more reliable. Also a note, for anyone trying to help, the url goes to pr0n, so be wary at work/school etc. I wasn't closing the file, thanks. I added it in, but it didn't change the output. The script only grabs the latest entries. I suppose the question is, how do I access the site's rss in its entirety? I tested by adding the feed to google and it has over 80,000 entries... Link to comment https://forums.phpfreaks.com/topic/151989-reading-rss-with-php/#findComment-798192 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.