How do I set the time for timing out

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jaymoore_299
Forum Contributor
Posts: 128
Joined: Wed May 11, 2005 6:40 pm
Contact:

How do I set the time for timing out

Post by jaymoore_299 »

I have a collection of urls that I visit with file() command. There may be over 300 to visit.
Some of the sites are either down or take too long to load, so I want to be able to move on to the next one faster than it is doing now.

I get the error message
"failed to open stream: Operation timed out in"

Is there a setting I can change so that this would time out even faster than it is doing now? Now it may be something like 1 minutes and I want it set to maybe 20 seconds or less.
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

you have to change default socket timeout value in php.ini
Look here for more detail.
Post Reply