mike Tue Mar 27 10:41:50 2007 UTC
Modified files:
/phpdoc/en/reference/http/functions/requests http-get.xml
Log:
- add example
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/http/functions/requests/http-get.xml?r1=1.4&r2=1.5&diff_format=u
Index: phpdoc/en/reference/http/functions/requests/http-get.xml
diff -u phpdoc/en/reference/http/functions/requests/http-get.xml:1.4
phpdoc/en/reference/http/functions/requests/http-get.xml:1.5
--- phpdoc/en/reference/http/functions/requests/http-get.xml:1.4 Tue Mar
27 10:13:49 2007
+++ phpdoc/en/reference/http/functions/requests/http-get.xml Tue Mar 27
10:41:50 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc.
-->
<refentry id="function.http-get">
<refnamediv>
@@ -45,51 +45,6 @@
<para>
Will be filled with request/response information
</para>
- <para>
- <screen>
-<![CDATA[array (
- 'effective_url' => 'http://www.example.com/',
- 'response_code' => 302,
- 'connect_code' => 0,
- 'filetime' => -1,
- 'total_time' => 0.212348,
- 'namelookup_time' => 0.038296,
- 'connect_time' => 0.104144,
- 'pretransfer_time' => 0.104307,
- 'starttransfer_time' => 0.212077,
- 'redirect_time' => 0,
- 'redirect_count' => 0,
- 'size_upload' => 0,
- 'size_download' => 218,
- 'speed_download' => 1026,
- 'speed_upload' => 0,
- 'header_size' => 307,
- 'request_size' => 103,
- 'ssl_verifyresult' => 0,
- 'ssl_engines' =>
- array (
- 0 => 'dynamic',
- 1 => 'cswift',
- 2 => 'chil',
- 3 => 'atalla',
- 4 => 'nuron',
- 5 => 'ubsec',
- 6 => 'aep',
- 7 => 'sureware',
- 8 => '4758cca',
- ),
- 'content_length_download' => 218,
- 'content_length_upload' => 0,
- 'content_type' => 'text/html',
- 'httpauth_avail' => 0,
- 'proxyauth_avail' => 0,
- 'num_connects' => 1,
- 'os_errno' => 0,
- 'error' => '',
-)
-]]>
- </screen>
- </para>
</listitem>
</varlistentry>
</variablelist>
@@ -137,36 +92,64 @@
-->
- <!-- Use when examples exist
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>http_get</function> example</title>
- <para>
- Any text that describes the purpose of the example, or
- what goes on in the example should go here (inside the
- <example> tag, not out
- </para>
<programlisting role="php">
<![CDATA[
<?php
-if ($anexample === true) {
- echo 'Use the PEAR Coding Standards';
-}
+$response = http_get("http://www.example.com/", array("timeout"=>1), $info);
+print_r($info);
?>
]]>
</programlisting>
&example.outputs;
<screen>
-<![CDATA[
-Use the PEAR Coding Standards
-]]>
- </screen>
+<![CDATA[array (
+ 'effective_url' => 'http://www.example.com/',
+ 'response_code' => 302,
+ 'connect_code' => 0,
+ 'filetime' => -1,
+ 'total_time' => 0.212348,
+ 'namelookup_time' => 0.038296,
+ 'connect_time' => 0.104144,
+ 'pretransfer_time' => 0.104307,
+ 'starttransfer_time' => 0.212077,
+ 'redirect_time' => 0,
+ 'redirect_count' => 0,
+ 'size_upload' => 0,
+ 'size_download' => 218,
+ 'speed_download' => 1026,
+ 'speed_upload' => 0,
+ 'header_size' => 307,
+ 'request_size' => 103,
+ 'ssl_verifyresult' => 0,
+ 'ssl_engines' =>
+ array (
+ 0 => 'dynamic',
+ 1 => 'cswift',
+ 2 => 'chil',
+ 3 => 'atalla',
+ 4 => 'nuron',
+ 5 => 'ubsec',
+ 6 => 'aep',
+ 7 => 'sureware',
+ 8 => '4758cca',
+ ),
+ 'content_length_download' => 218,
+ 'content_length_upload' => 0,
+ 'content_type' => 'text/html',
+ 'httpauth_avail' => 0,
+ 'proxyauth_avail' => 0,
+ 'num_connects' => 1,
+ 'os_errno' => 0,
+ 'error' => '',
+)]]></screen>
</example>
</para>
</refsect1>
- -->
<!-- Use when adding See Also links