mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-26 13:58:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@297028 c90b9560-bf6c-de11-be94-00142212c4b1
189 lines
4.3 KiB
XML
189 lines
4.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
|
|
<refentry xml:id="function.http-get" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>http_get</refname>
|
|
<refpurpose>Perform GET request</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>http_get</methodname>
|
|
<methodparam><type>string</type><parameter>url</parameter></methodparam>
|
|
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
|
|
<methodparam choice="opt"><type>array</type><parameter role="reference">info</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Performs an HTTP GET request on the supplied url.
|
|
</para>
|
|
&see.http.request.options;
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>url</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
URL
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>options</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
&link.http.request.options;
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>info</parameter></term>
|
|
<listitem xml:id="http.request.info">
|
|
<para>
|
|
Will be filled with request/response information
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&returns.http.response;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<!-- Use when ERRORS exist
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
When does this function throw E_* level errors, or exceptions?
|
|
</para>
|
|
</refsect1>
|
|
-->
|
|
|
|
|
|
<!-- Use when a CHANGELOG exists
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>Enter the PHP version of change here</entry>
|
|
<entry>Description of change</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</refsect1>
|
|
-->
|
|
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>A <function>http_get</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$response = http_get("http://www.example.com/", array("timeout"=>1), $info);
|
|
print_r($info);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<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
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function></function></member>
|
|
<member>Or <link linkend="somethingelse">something else</link></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
-->
|
|
|
|
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|