|
Posted by Al on 02/01/05 23:15
I can't use a bad URL because the fopen fails.
I assumed from reading the manual that if I started stream_set_timeout() it
would monitor the stream and do something when it reached the timeout, either
truncate my data stream or show up as [timed_out] => true. It doesn't appear to
do anything.
I can set the timeout down to microseconds and/or read a 4mb remote file and
nothing appears to happen. The 4mb file is read fully and [timed_out] => never
changes for small or large files, microseconds or 600 seconds.
I did a function_exists() on stream_set_timeout() and it's fine and I have all
errors on and nothing unusual shows up.
php version is 4.3.10
Richard Lynch wrote:
>
>
>
> Al wrote:
>
>>Hi Richard, thanks for the help.
>>
>>Note I have the timeout set for 1 microsec, have tried several values, eg,
>>100ms, 1 sec, etc. I even used a 4mb file and it did nothing.
>>
>>It seems as if stream_set_timeout() does nothing.
>>
>>Note in socket_get_status(), [timed_out] => is always false.
>
>
> v
> timed_out
> ^
> / \
> / \
> Lost data because your time-out expired
>
> Possibly you have such a good connection, it never times out.
>
>
> Try connection to something that's not there -- Like:
> $URL_full = 'http://example.com';
>
Navigation:
[Reply to this message]
|