Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
p17blo
Regular
Regular


Joined: Jul 27, 2007
Posts: 77

PostPosted: Fri Aug 31, 2007 2:09 am Reply with quote

I have developed a block that reads RSS feeds from a number of sources combining them into one output.

The trouble is that the block continually tries to read the RSS feed even if the page is unavailable, this holds up the rest of the page loading as the blocks appears to load in order and it take an absolute age to time out and eventually results in an Internal Server Error.

I am trying to find a way to define that if anything in the block takes longer than 30 seconds to get a response it should just assume that the feed is empty and to move on to the next command.

I can post some script if it helps but it does have a number is includes. (for RSS Parsing etc)

Paul
 
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9449
Location: Arizona

PostPosted: Fri Aug 31, 2007 6:26 am Reply with quote

What PHP function are you using to go get the content? I would search in the PHP manual for additional parameters that you can set up for that function. For example, look at function fsockopen in the manual. Wink

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
fkelly
Former Moderator in Good Standing


Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Fri Aug 31, 2007 7:19 am Reply with quote

The headlines function in mainfile does a fsockopen read of an external feed. You can take a look at that for an example. And fsockopen does have a timeout parameter in it as Montego hints. That is used in the headlines function. So you have the manual and an example. What more could there be?
 
View user's profile Send private message Visit poster's website
p17blo
PostPosted: Fri Aug 31, 2007 9:12 am Reply with quote

Thanks both. I will check that out. You see as a non-programmer I don't even know of the existence of commands such as FSOCKOPEN so I have to rely on you shoving me in the right direction. Smile

Paul
 
montego
PostPosted: Sat Sep 01, 2007 6:21 am Reply with quote

Please don't take this wrong, but really do familiarize yourself with the on-line PHP manual and searches there; it is an invaluable resource. You could end up finding your answers quicker is all. You can even download the entire manual as a windows help file.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©