mirror of
https://github.com/php/doc-en.git
synced 2026-03-23 23:32:18 +01:00
Remove curl context (#2270)
This was removed in PHP 5.5: https://wiki.php.net/rfc/curl-wrappers-removal-rfc
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
&language.context.http;
|
||||
&language.context.ftp;
|
||||
&language.context.ssl;
|
||||
&language.context.curl;
|
||||
&language.context.phar;
|
||||
&language.context.parameters;
|
||||
&language.context.zip;
|
||||
|
||||
@@ -1,215 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="context.curl" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
|
||||
<refnamediv>
|
||||
<refname>CURL context options</refname>
|
||||
<refpurpose>CURL context option listing</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>
|
||||
CURL context options are available when the
|
||||
<link linkend="intro.curl">CURL</link> extension was compiled using the
|
||||
<option>--with-curlwrappers</option> configure option.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="options"><!-- {{{ -->
|
||||
&reftitle.options;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry xml:id="context.curl.method">
|
||||
<term>
|
||||
<parameter>method</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
<constant>GET</constant>, <constant>POST</constant>, or
|
||||
any other HTTP method supported by the remote server.
|
||||
</para>
|
||||
<para>
|
||||
Defaults to <constant>GET</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="context.curl.header">
|
||||
<term>
|
||||
<parameter>header</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Additional headers to be sent during request. Values
|
||||
in this option will override other values (such as
|
||||
<literal>User-agent:</literal>, <literal>Host:</literal>,
|
||||
and <literal>Authentication:</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="context.curl.user-agent">
|
||||
<term>
|
||||
<parameter>user_agent</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Value to send with User-Agent: header.
|
||||
</para>
|
||||
<para>
|
||||
By default the
|
||||
<link linkend="ini.user-agent">user_agent</link>
|
||||
&php.ini; setting is used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="context.curl.content">
|
||||
<term>
|
||||
<parameter>content</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Additional data to be sent after the headers. This option is not used
|
||||
for <constant>GET</constant> or <constant>HEAD</constant> requests.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="context.curl.proxy">
|
||||
<term>
|
||||
<parameter>proxy</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
URI specifying address of proxy server. (e.g.
|
||||
<literal>tcp://proxy.example.com:5100</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="context.curl.max-redirects">
|
||||
<term>
|
||||
<parameter>max_redirects</parameter>
|
||||
<type>int</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The max number of redirects to follow. Value <literal>1</literal> or
|
||||
less means that no redirects are followed.
|
||||
</para>
|
||||
<para>
|
||||
Defaults to <literal>20</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="context.curl.curl-verify-ssl-host">
|
||||
<term>
|
||||
<parameter>curl_verify_ssl_host</parameter>
|
||||
<type>bool</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Verify the host.
|
||||
</para>
|
||||
<para>
|
||||
Defaults to &false;
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
This option is available for both the http and ftp protocol wrappers.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="context.curl.curl-verify-ssl-peer">
|
||||
<term>
|
||||
<parameter>curl_verify_ssl_peer</parameter>
|
||||
<type>bool</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Require verification of SSL certificate used.
|
||||
</para>
|
||||
<para>
|
||||
Defaults to &false;
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
This option is available for both the http and ftp protocol wrappers.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="examples"><!-- {{{ -->
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example xml:id="context.curl.example-post"><!-- {{{ -->
|
||||
<title>Fetch a page and send POST data</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$postdata = http_build_query(
|
||||
array(
|
||||
'var1' => 'some content',
|
||||
'var2' => 'doh'
|
||||
)
|
||||
);
|
||||
|
||||
$opts = array('http' =>
|
||||
array(
|
||||
'method' => 'POST',
|
||||
'header' => 'Content-type: application/x-www-form-urlencoded',
|
||||
'content' => $postdata
|
||||
)
|
||||
);
|
||||
|
||||
$context = stream_context_create($opts);
|
||||
|
||||
$result = file_get_contents('http://example.com/submit.php', false, $context);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example><!-- }}} -->
|
||||
</para>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="context.socket" /></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
|
||||
-->
|
||||
|
||||
Reference in New Issue
Block a user