note 74551 deleted from function.file-get-contents by salathe
| From: | salathe@php.net | Date: | Mon, 21 Sep 2020 14:38:19 +0000 |
| Subject: | note 74551 deleted from function.file-get-contents by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-215238@lists.php.net to get a copy of this message | ||
Note Submitter: Greg Ambrose (greg at catalina-it dot com dot au)
----
[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.