Jump to content

Recommended Posts

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

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

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.