Re: [PHP] stream_set_timeout() mystery

2005-02-01 Thread Richard Lynch
Al wrote: > I can't use a bad URL because the fopen fails. Sorry, that was silly of me. > 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_

Re: [PHP] stream_set_timeout() mystery

2005-02-01 Thread Al
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.

Re: [PHP] stream_set_timeout() mystery

2005-02-01 Thread Jochem Maas
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

Re: [PHP] stream_set_timeout() mystery

2005-02-01 Thread Richard Lynch
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 a

Re: [PHP] stream_set_timeout() mystery

2005-02-01 Thread Al
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. Richard Lynch w

Re: [PHP] stream_set_timeout() mystery

2005-02-01 Thread Richard Lynch
Al wrote: > Anyone see why stream_set_timeout() / socket_get_status() don't work? Perhaps you should explain what you think isn't working... Cuz it sure looks good to me... > $fp= fopen($URL_full, 'r'); > > stream_set_timeout($fp, 0, 1); tried other values for microseconds > > $procque_str= frea

[PHP] stream_set_timeout() mystery

2005-02-01 Thread Al
Anyone see why stream_set_timeout() / socket_get_status() don't work? $fp= fopen($URL_full, 'r'); stream_set_timeout($fp, 0, 1); tried other values for microseconds $procque_str= fread($fp, 8096); print_r(socket_get_status($fp)) ; Print_r is: Array ( [wrapper_data] => Array