Re: stream_set_timeout() mystery
| From: | Al | Date: | Tue, 01 Feb 2005 18:30:12 +0000 |
| Subject: | Re: stream_set_timeout() mystery | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-207847@lists.php.net to get a copy of this message | ||
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 wrote:
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= fread($fp, 8096); print_r(socket_get_status($fp)) ; Print_r is:Array ( [wrapper_data] => Array-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php( [0] => HTTP/1.1 200 OK [1] => Date: Tue, 01 Feb 2005 15:45:12 GMT [2] => Server: Apache/1.3.33 (Unix) FrontPage/5.0.2.2635mod_ssl/2.8.22 OpenSSL/0.9.7d PowWeb/1.1[3] => Cache-Control: no-store, no-cache, must-revalidate,post-check=0, pre-check=0[4] => Expires: Thu, 19 Nov 1981 08:52:00 GMT [5] => Pragma: no-cache [6] => X-Powered-By: PHP/4.3.10 [7] => Set-Cookie:PHPSESSID=d253e66f43edf09f0d461709db95b178; path=/[8] => Connection: close [9] => Content-Type: text/html )[wrapper_type] => HTTP [stream_type] => socket [unread_bytes] => 0 [timed_out] => [blocked] => 1 [eof] => )