file_get_contents timeout?

From: Blue 58 (Blue58_at_set.hut)
Date: 08/29/04


Date: Sun, 29 Aug 2004 05:37:44 -0500


One of my scripts uses file_get_contents to get a file from a
notoriously slow server. The file is not critical to my script, and
I would like to avoid the long delays that often occur.

Is there any way to set a time limit for file_get_contents?

I've tried all kinds of combinations with stream_set_timeout, but:
1) they delay is still present
2) if the delay is longer than the set timout, I get a "Warning:
stream_set_timeout(): supplied argument is not a valid stream
resource" (in that line).