note 84901 added to function.file-get-contents
| From: | daniele dot ricci at staff dot dada dot net | Date: | Tue, 05 Aug 2008 11:13:55 +0000 |
| Subject: | note 84901 added to function.file-get-contents | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-143154@lists.php.net to get a copy of this message | ||
I recently upgraded my server to Slackware 12.0.
After this, a program of mine stopped working: the call to file_get_contents (to an URL served by a
custom HTTP server) was returning false without generating any error!
After some investigations I saw this: my custom HTTP server closes the connection at the end of the
content. This (without the header "Connection: close") seems to cause the problem I
described.
To solve the problem I simply added that header to the answer of my custom HTTP server.
----
Server IP: 213.92.11.19
Probable Submitter: 195.110.97.5
----
Manual Page -- http://www.php.net/manual/en/function.file-get-contents.php
Edit -- https://master.php.net/note/edit/84901
Del: integrated -- https://master.php.net/note/delete/84901/integrated
Del: useless -- https://master.php.net/note/delete/84901/useless
Del: bad code -- https://master.php.net/note/delete/84901/bad+code
Del: spam -- https://master.php.net/note/delete/84901/spam
Del: non-english -- https://master.php.net/note/delete/84901/non-english
Del: in docs -- https://master.php.net/note/delete/84901/in+docs
Del: other reasons-- https://master.php.net/note/delete/84901
Reject -- https://master.php.net/note/reject/84901
Search -- https://master.php.net/manage/user-notes.php