mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
- add example
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@232720 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
ccc0f82628
commit
986a0388df
1 changed files with 43 additions and 60 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue