svn: /phpdoc/en/trunk/reference/curl/functions/ curl-unescape.xml
| From: | Adam Kazimierczak | Date: | Sat, 15 Jun 2013 13:02:31 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/curl/functions/ curl-unescape.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-11384@lists.php.net to get a copy of this message | ||
kazymjir Sat, 15 Jun 2013 13:02:31 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=330505
Log:
Documentation for curl_unescape
Changed paths:
U phpdoc/en/trunk/reference/curl/functions/curl-unescape.xml
Modified: phpdoc/en/trunk/reference/curl/functions/curl-unescape.xml
===================================================================
--- phpdoc/en/trunk/reference/curl/functions/curl-unescape.xml 2013-06-15 12:59:41 UTC (rev 330504)
+++ phpdoc/en/trunk/reference/curl/functions/curl-unescape.xml 2013-06-15 13:02:31 UTC (rev 330505)
@@ -4,7 +4,7 @@
<refentry xml:id="function.curl-unescape" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>curl_unescape</refname>
- <refpurpose>URL decodes the given string</refpurpose>
+ <refpurpose>Decodes the given URL encoded string</refpurpose>
</refnamediv>
<refsect1 role="description">
@@ -15,11 +15,8 @@
<methodparam><type>string</type><parameter>str</parameter></methodparam>
</methodsynopsis>
<para>
-
+ This function decodes the given URL encoded string.
</para>
-
- &warn.undocumented.func;
-
</refsect1>
<refsect1 role="parameters">
@@ -30,7 +27,7 @@
<term><parameter>str</parameter></term>
<listitem>
<para>
-
+ The URL encoded string to be decoded.
</para>
</listitem>
</varlistentry>
@@ -40,10 +37,64 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- Return unescaped string&return.falseforfailure;.
+ Returns decoded string &return.falseforfailure;.
</para>
</refsect1>
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><function>curl_escape</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+// Create a curl handle
+$ch = curl_init('http://example.com/redirect.php');
+
+// Send HTTP request and follow redirections
+curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
+curl_exec($ch);
+
+// Get the last effective URL
+$effective_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
+// ie. "http://example.com/show_location.php?loc=M%C3%BCnchen"
+
+// Decode the URL
+$effective_url_decoded = curl_unescape($ch, $effective_url);
+// "http://example.com/show_location.php?loc=München"
+
+// Close the handle
+curl_close($ch);
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="notes">
+ &reftitle.notes;
+ <note>
+ <para>
+ <function>curl_unescape</function> does not decode plus symbols (+) into spaces.
<function>urldecode</function> does.
+ </para>
+ </note>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>curl_escape</function></member>
+ <member><function>urlencode</function></member>
+ <member><function>urldecode</function></member>
+ <member><function>rawurlencode</function></member>
+ <member><function>rawurldecode</function></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file