From 01d277e32f450c405ac9bb9a19b14e616398af15 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 16 Mar 2002 15:06:08 +0000 Subject: [PATCH] update docs to reflect recent streams changes git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@73589 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/filesystem.xml | 47 ++++++++++++++++++++++++++++++++++++---- functions/network.xml | 9 +++++++- 2 files changed, 51 insertions(+), 5 deletions(-) diff --git a/functions/filesystem.xml b/functions/filesystem.xml index f443bfed4d..ba122e3c7b 100644 --- a/functions/filesystem.xml +++ b/functions/filesystem.xml @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -1130,6 +1130,35 @@ $fcontents = implode ('', file ('http://www.php.net/')); + + + fgetwrapperdata + Retrieves header/meta data from "wrapped" file pointers + + + Description + + mixedfgetwrapperdata + intfp + + + This function returns header or meta data from files opened with + fopen. This is useful to return the response + headers for HTTP connections, or some other statistics for other + resources. + + + The format of the returned data is deliberately undocumented at this + time. + + + + This function was introduced in PHP 4.3.0. + + + + + fopen @@ -1151,11 +1180,21 @@ $fcontents = implode ('', file ('http://www.php.net/')); of the body of the response. A 'Host:' header is sent with the request in order to handle name-based virtual hosts. + + As of PHP 4.3.0 (not yet released), if you have compiled in + support for OpenSSL, you may use "https://" to open an HTTP + connection over SSL. 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. Additionally, - HTTP connections are read-only. + body of the response; to retrieve the HTTP + response header you need to be using PHP 4.0.5 or later; + The headers will be stored in the $http_response_header variable. + As of PHP 4.3.0 (not yet released), the header information can + be retrieved using the fgetwrapperdata. + + + HTTP connections are read-only; you cannot write data or copy + files to an HTTP resource. Versions prior to PHP 4.0.5 do not handle HTTP redirects. Because diff --git a/functions/network.xml b/functions/network.xml index 2fdfbe4532..dac3622d2c 100644 --- a/functions/network.xml +++ b/functions/network.xml @@ -1,5 +1,5 @@ - + Network Functions Network @@ -160,6 +160,13 @@ case. The optional timeout can be used to set a timeout in seconds for the connect system call. + + As of PHP 4.3.0, if you have compiled in OpenSSL support, you may + prefix the hostname with either + 'ssl://' or 'tls://' to + use an SSL or TLS client connection over TCP/IP to connect + to the remote host. + fsockopen returns a file pointer which may be used together with the other file functions (such as