From 860f5c51638d3b36805dec94f1c3230522ba4b3f Mon Sep 17 00:00:00 2001 From: Ken Coar Date: Sun, 8 Jul 2001 13:37:39 +0000 Subject: [PATCH] A little clarification about what you get when you read from an fopen'd http:// URL. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@50904 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/filesystem.xml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/functions/filesystem.xml b/functions/filesystem.xml index 959b0023f7..306c3937e9 100644 --- a/functions/filesystem.xml +++ b/functions/filesystem.xml @@ -1140,10 +1140,16 @@ $fcontents = join ('', file ('http://www.php.net')); If filename begins with "http://" (not case sensitive), an HTTP 1.0 connection is opened to the - specified server and a file pointer is returned to the beginning - of the text of the response. A 'Host:' header is sent with the + specified server, the page is requested using the HTTP GET + method, and a file pointer is returned to the beginning + of the body of the response. A 'Host:' header is sent with the request in order to handle name-based virtual hosts. + + Note that the file pointer allows you to retrieve only the + body of the response; you cannot + access the HTTP response header using this function. + Versions prior to PHP 4.0.5 do not handle HTTP redirects. Because of this, directories must include trailing slashes.