note 74551 modified in function.file-get-contents by bjori
| From: | bjori@php.net | Date: | Tue, 17 Apr 2007 09:30:10 +0000 |
| Subject: | note 74551 modified in function.file-get-contents by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-125500@lists.php.net to get a copy of this message | ||
[Editors note: As of PHP 5.2.1 you can specify
timeout context option and pass the
context to file_get_contents()]
The only way I could get get_file_contents() to wait for a very slow http request was to set the
socket timeout as follows.
ini_set('default_socket_timeout', 120);
$a = file_get_contents("http://abcxyz.com");
Other times like execution time and input time had no effect.
--was--
The only way I could get get_file_contents() to wait for a very slow http request was to set the
socket timeout as follows.
ini_set('default_socket_timeout', 120);
$a = file_get_contents("http://abcxyz.com");
Other times like execution time and input time had no effect.
http://php.net/manual/en/function.file-get-contents.php