svn: /phpdoc/en/trunk/language/wrappers/ http.xml

From: Date: Sun, 12 Dec 2010 10:27:10 +0000
Subject: svn: /phpdoc/en/trunk/language/wrappers/ http.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-7516@lists.php.net to get a copy of this message
bjori Sun, 12 Dec 2010 10:27:10 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=306257 Log: - Refactor random inline version info into the changelog - Add see also - Add title to the example, and fix CS - Minor paraphrasing to kill off 'you' Changed paths: U phpdoc/en/trunk/language/wrappers/http.xml Modified: phpdoc/en/trunk/language/wrappers/http.xml =================================================================== --- phpdoc/en/trunk/language/wrappers/http.xml 2010-12-12 07:51:36 UTC (rev 306256) +++ phpdoc/en/trunk/language/wrappers/http.xml 2010-12-12 10:27:10 UTC (rev 306257) @@ -21,23 +21,17 @@ The stream allows access to the <emphasis>body</emphasis> of the resource; the headers are stored in the <varname>$http_response_header</varname> variable. - Since PHP 4.3.0, the headers are available using - <function>stream_get_meta_data</function>. </simpara> - &warn.ssl-non-standard; <simpara> - Redirects have been supported since PHP 4.0.5; if you are using - an earlier version you will need to include trailing slashes in - your URLs. If it's important to know the URL of the resource where + If it's important to know the URL of the resource where your document came from (after all redirects have been processed), you'll need to process the series of response headers returned by the stream. </simpara> <simpara> - If you have set the <link linkend="ini.from">from</link> directive - in &php.ini;, and do not define a <literal>From:</literal> header - in the <xref linkend="context" />, then this value will be sent as the - <literal>From:</literal> header in the HTTP request. + The <link linkend="ini.from">from</link> directive will be used for the + <literal>From:</literal> header if set and not overwritten by the + <xref linkend="context" />. </simpara> </refsect1><!-- }}} --> @@ -125,11 +119,23 @@ </thead> <tbody> <row> + <entry>4.3.7</entry> + <entry> + Detect buggy IIS servers to avoid <literal>"SSL: Fatal Protocol Error"</literal> errors. + </entry> + </row> + <row> <entry>4.3.0</entry> <entry> Added <literal>https://</literal>. </entry> </row> + <row> + <entry>4.0.5</entry> + <entry> + Added support for redirects. + </entry> + </row> </tbody> </tgroup> </informaltable> @@ -139,6 +145,7 @@ <refsect1 role="examples"><!-- {{{ --> &reftitle.examples; <example xml:id="wrappers.http.example.basic"><!-- {{{ --> + <title>Detecting which URL we ended up on after redirects</title> <programlisting role="php"> <![CDATA[ <?php @@ -146,17 +153,16 @@ $fp = fopen($url, 'r'); -/* Prior to PHP 4.3.0 use $http_response_header - instead of stream_get_meta_data() */ $meta_data = stream_get_meta_data($fp); foreach($meta_data['wrapper_data'] as $response) { - /* Were we redirected? */ - if (substr(strtolower($response), 0, 10) == 'location: ') { - /* update $url with where we were redirected to */ - $url = substr($response, 18); - } + /* Were we redirected? */ + if (substr(strtolower($response), 0, 10) == 'location: ') { + /* update $url with where we were redirected to */ + $url = substr($response, 18); + } + } ?> @@ -209,8 +215,21 @@ HTTP connections are read-only; writing data or copying files to an HTTP resource is not supported. </simpara> + <simpara> + Sending <emphasis>POST</emphasis> and <emphasis>PUT</emphasis> requests, for example, + can be done with the help of <link linkend="context.http">HTTP Contexts</link>. + </simpara> </refsect1><!-- }}} --> + <refsect1 role="seealso"><!-- {{{ --> + &reftitle.seealso; + <simplelist> + <member><xref linkend="context.http" /></member> + <member><varname>$http_response_header</varname></member> + <member><function>stream_get_meta_data</function></member> + </simplelist> + </refsect1><!-- }}} --> + </refentry> <!-- Keep this comment at the end of the file

« previous php.doc.cvs (#7516) next »