didou Sat Feb 3 01:10:52 2007 UTC
Modified files:
/phpdoc/en/reference/url/functions base64-decode.xml
base64-encode.xml
get-headers.xml
get-meta-tags.xml
http-build-query.xml
parse-url.xml rawurldecode.xml
rawurlencode.xml urldecode.xml
urlencode.xml
Log:
ref.url: switch to new style
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/url/functions/base64-decode.xml?r1=1.9&r2=1.10&diff_format=u
Index: phpdoc/en/reference/url/functions/base64-decode.xml
diff -u phpdoc/en/reference/url/functions/base64-decode.xml:1.9
phpdoc/en/reference/url/functions/base64-decode.xml:1.10
--- phpdoc/en/reference/url/functions/base64-decode.xml:1.9 Sat Feb 3
01:10:25 2007
+++ phpdoc/en/reference/url/functions/base64-decode.xml Sat Feb 3 01:10:51 2007
@@ -1,22 +1,48 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.9 $ -->
+<!-- $Revision: 1.10 $ -->
<refentry id="function.base64-decode">
<refnamediv>
<refname>base64_decode</refname>
<refpurpose>Decodes data encoded with MIME base64</refpurpose>
</refnamediv>
-
- <refsect1>
- <title>Description</title>
+
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>string</type><methodname>base64_decode</methodname>
-
<methodparam><type>string</type><parameter>encoded_data</parameter></methodparam>
+ <methodparam><type>string</type><parameter>data</parameter></methodparam>
</methodsynopsis>
<para>
- <function>base64_decode</function> decodes
- <parameter>encoded_data</parameter> and returns the original
- data or &false; on failure. The returned data may be binary.
+ Decodes a base64 encoded <parameter>data</parameter>.
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>data</parameter></term>
+ <listitem>
+ <para>
+ The decoded data.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Returns the original data or &false; on failure. The returned data may be
+ binary.
</para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
<para>
<example>
<title><function>base64_decode</function> example</title>
@@ -28,9 +54,7 @@
?>
]]>
</programlisting>
- <para>
- This example will produce:
- </para>
+ &example.outputs;
<screen>
<![CDATA[
This is an encoded string
@@ -38,11 +62,18 @@
</screen>
</example>
</para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
<para>
- See also <function>base64_encode</function> and
- <ulink url="&url.rfc;2045">RFC 2045</ulink> section 6.8.
+ <simplelist>
+ <member><function>base64_encode</function></member>
+ <member><ulink url="&url.rfc;2045">RFC 2045</ulink> section 6.8</member>
+ </simplelist>
</para>
</refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/url/functions/base64-encode.xml?r1=1.9&r2=1.10&diff_format=u
Index: phpdoc/en/reference/url/functions/base64-encode.xml
diff -u phpdoc/en/reference/url/functions/base64-encode.xml:1.9
phpdoc/en/reference/url/functions/base64-encode.xml:1.10
--- phpdoc/en/reference/url/functions/base64-encode.xml:1.9 Sat Feb 3
01:10:25 2007
+++ phpdoc/en/reference/url/functions/base64-encode.xml Sat Feb 3 01:10:52 2007
@@ -1,27 +1,55 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.9 $ -->
+<!-- $Revision: 1.10 $ -->
<refentry id="function.base64-encode">
<refnamediv>
<refname>base64_encode</refname>
<refpurpose>Encodes data with MIME base64</refpurpose>
</refnamediv>
-
- <refsect1>
- <title>Description</title>
+
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>string</type><methodname>base64_encode</methodname>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
</methodsynopsis>
<para>
- <function>base64_encode</function> returns
- <parameter>data</parameter> encoded with base64. This encoding
- is designed to make binary data survive transport through
+ Encodes the given <parameter>data</parameter> with base64.
+ </para>
+ <para>
+ This encoding is designed to make binary data survive transport through
transport layers that are not 8-bit clean, such as mail bodies.
</para>
<para>
Base64-encoded data takes about 33% more space than the original
data.
</para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>data</parameter></term>
+ <listitem>
+ <para>
+ The data to encode.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ The encoded data, as a string.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
<para>
<example>
<title><function>base64_encode</function> example</title>
@@ -33,9 +61,7 @@
?>
]]>
</programlisting>
- <para>
- This example will produce:
- </para>
+ &example.outputs;
<screen>
<![CDATA[
VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==
@@ -43,14 +69,20 @@
</screen>
</example>
</para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
<para>
- See also
- <function>base64_decode</function>,
- <function>chunk_split</function>,
- <function>convert_uuencode</function> and
- <ulink url="&url.rfc;2045">RFC 2045</ulink> section 6.8.
+ <simplelist>
+ <member><function>base64_decode</function></member>
+ <member><function>chunk_split</function></member>
+ <member><function>convert_uuencode</function></member>
+ <member><ulink url="&url.rfc;2045">RFC 2045</ulink> section 6.8</member>
+ </simplelist>
</para>
</refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/url/functions/get-headers.xml?r1=1.9&r2=1.10&diff_format=u
Index: phpdoc/en/reference/url/functions/get-headers.xml
diff -u phpdoc/en/reference/url/functions/get-headers.xml:1.9
phpdoc/en/reference/url/functions/get-headers.xml:1.10
--- phpdoc/en/reference/url/functions/get-headers.xml:1.9 Sat Feb 3
01:10:25 2007
+++ phpdoc/en/reference/url/functions/get-headers.xml Sat Feb 3 01:10:52 2007
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.9 $ -->
+<!-- $Revision: 1.10 $ -->
<refentry id="function.get-headers">
<refnamediv>
<refname>get_headers</refname>
<refpurpose>Fetches all the headers sent by the server in response to a HTTP
request</refpurpose>
</refnamediv>
- <refsect1>
- <title>Description</title>
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>array</type><methodname>get_headers</methodname>
<methodparam><type>string</type><parameter>url</parameter></methodparam>
@@ -15,21 +15,72 @@
</methodsynopsis>
<para>
<function>get_headers</function> returns an array with the headers sent
- by the server in response to a HTTP request. Returns &false; on failure
- and an error of level <constant>E_WARNING</constant> will be issued.
+ by the server in response to a HTTP request.
</para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
<para>
- If the optional <parameter>format</parameter> parameter is set to 1,
- <function>get_headers</function> parses the response and sets the array's
- keys.
+ <variablelist>
+ <varlistentry>
+ <term><parameter>url</parameter></term>
+ <listitem>
+ <para>
+ The target URL.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>format</parameter></term>
+ <listitem>
+ <para>
+ If the optional <parameter>format</parameter> parameter is set to 1,
+ <function>get_headers</function> parses the response and sets the
+ array's keys.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</para>
- <note>
- <para>
- Since PHP 5.1.3 this function uses the default stream context, which can
- be set/changed with the <function>stream_context_get_default</function>
- function.
- </para>
- </note>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Returns an indexed or associative array with the headers, or &false; on
+ failure.
+ </para>
+ </refsect1>
+
+ <refsect1 role="changelog">
+ &reftitle.changelog;
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>5.1.3</entry>
+ <entry>
+ This function now uses the default stream context, which can be
+ set/changed with the <function>stream_context_get_default</function>
+ function.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
<para>
<example>
<title><function>get_headers</function> example</title>
@@ -77,6 +128,7 @@
</example>
</para>
</refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/url/functions/get-meta-tags.xml?r1=1.9&r2=1.10&diff_format=u
Index: phpdoc/en/reference/url/functions/get-meta-tags.xml
diff -u phpdoc/en/reference/url/functions/get-meta-tags.xml:1.9
phpdoc/en/reference/url/functions/get-meta-tags.xml:1.10
--- phpdoc/en/reference/url/functions/get-meta-tags.xml:1.9 Sat Feb 3
01:10:25 2007
+++ phpdoc/en/reference/url/functions/get-meta-tags.xml Sat Feb 3 01:10:52 2007
@@ -1,34 +1,40 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.9 $ -->
+<!-- $Revision: 1.10 $ -->
<refentry id="function.get-meta-tags">
<refnamediv>
<refname>get_meta_tags</refname>
<refpurpose>Extracts all meta tag content attributes from a file and returns
an array</refpurpose>
</refnamediv>
- <refsect1>
- <title>Description</title>
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>array</type><methodname>get_meta_tags</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam
choice="opt"><type>bool</type><parameter>use_include_path</parameter></methodparam>
</methodsynopsis>
<para>
- Opens <parameter>filename</parameter> and parses it line by line
- for <meta> tags in the file. This can be a local file or
- an <acronym>URL</acronym>. The parsing stops at
+ Opens <parameter>filename</parameter> and parses it line by line for
+ <meta> tags in the file. The parsing stops at
<literal></head></literal>.
</para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
<para>
- Setting <parameter>use_include_path</parameter> to &true; will result
- in PHP trying to open the file along the standard include path
- as per the <link linkend="ini.include-path">include_path</link>
- directive. This is used for local files, not URLs.
- </para>
- <para>
- <example>
- <title>What <function>get_meta_tags</function> parses</title>
- <programlisting role="html">
+ <variablelist>
+ <varlistentry>
+ <term><parameter>filename</parameter></term>
+ <listitem>
+ <para>
+ The path to the HTML file, as a string. This can be a local file or an
+ <acronym>URL</acronym>.
+ </para>
+ <para>
+ <example>
+ <title>What <function>get_meta_tags</function> parses</title>
+ <programlisting role="html">
<![CDATA[
<meta name="author" content="name">
<meta name="keywords" content="php documentation">
@@ -36,20 +42,69 @@
<meta name="geo.position" content="49.33;-86.59">
</head> <!-- parsing stops here -->
]]>
- </programlisting>
- </example>
- (pay attention to line endings - PHP uses a native function to
- parse the input, so a Mac file won't work on Unix).
+ </programlisting>
+ </example>
+ (pay attention to line endings - PHP uses a native function to
+ parse the input, so a Mac file won't work on Unix).
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>use_include_path</parameter></term>
+ <listitem>
+ <para>
+ Setting <parameter>use_include_path</parameter> to &true; will result
+ in PHP trying to open the file along the standard include path as per
+ the <link linkend="ini.include-path">include_path</link> directive.
+ This is used for local files, not URLs.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Returns an array with all the parsed meta tags.
+ </para>
+ <para>
+ The value of the name property becomes the key, the value of the content
+ property becomes the value of the returned array, so you can easily use
+ standard array functions to traverse it or access single values.
+ Special characters in the value of the name property are substituted with
+ '_', the rest is converted to lower case. If two meta tags have the same
+ name, only the last one is returned.
</para>
+ </refsect1>
+
+ <refsect1 role="changelog">
+ &reftitle.changelog;
<para>
- The value of the name property becomes the key, the value of the
- content property becomes the value of the returned array, so you
- can easily use standard array functions to traverse it or access
- single values. Special characters in the value of the name
- property are substituted with '_', the rest is converted to lower
- case. If two meta tags have the same name, only the last one
- is returned.
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>4.0.5</entry>
+ <entry>
+ Support for unquoted HTML attributes was added.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
</para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
<para>
<example>
<title>What <function>get_meta_tags</function> returns</title>
@@ -70,17 +125,18 @@
</programlisting>
</example>
</para>
- <note>
- <para>
- As of PHP 4.0.5, <function>get_meta_tags</function> supports
- unquoted HTML attributes.
- </para>
- </note>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
<para>
- See also <function>htmlentities</function> and
- <function>urlencode</function>.
+ <simplelist>
+ <member><function>htmlentities</function></member>
+ <member><function>urlencode</function></member>
+ </simplelist>
</para>
</refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/url/functions/http-build-query.xml?r1=1.14&r2=1.15&diff_format=u
Index: phpdoc/en/reference/url/functions/http-build-query.xml
diff -u phpdoc/en/reference/url/functions/http-build-query.xml:1.14
phpdoc/en/reference/url/functions/http-build-query.xml:1.15
--- phpdoc/en/reference/url/functions/http-build-query.xml:1.14 Sat Feb 3
01:10:25 2007
+++ phpdoc/en/reference/url/functions/http-build-query.xml Sat Feb 3
01:10:52 2007
@@ -1,39 +1,102 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.14 $ -->
+<!-- $Revision: 1.15 $ -->
<refentry id="function.http-build-query">
<refnamediv>
<refname>http_build_query</refname>
<refpurpose>Generate URL-encoded query string</refpurpose>
</refnamediv>
- <refsect1>
- <title>Description</title>
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>string</type><methodname>http_build_query</methodname>
<methodparam><type>array</type><parameter>formdata</parameter></methodparam>
<methodparam
choice="opt"><type>string</type><parameter>numeric_prefix</parameter></methodparam>
<methodparam
choice="opt"><type>string</type><parameter>arg_separator</parameter></methodparam>
</methodsynopsis>
- <simpara>
- Generates a URL-encoded query string from the associative (or indexed)
array provided.
- <parameter>formdata</parameter> may be an array or object containing
properties.
- A <parameter>formdata</parameter> array may be a simple one-dimensional
structure,
- or an array of arrays (who in turn may contain other arrays). If numeric
indices
- are used in the base array and a <parameter>numeric_prefix</parameter> is
provided,
- it will be prepended to the numeric index for elements in the base array
only.
- This is to allow for legal variable names when the data is decoded by PHP
- or another CGI application later on.
- </simpara>
+ <para>
+ Generates a URL-encoded query string from the associative (or indexed)
+ array provided.
+ </para>
+ </refsect1>
- <note>
- <para>
- <link linkend="ini.arg-separator.output">arg_separator.output</link> is
- used to separate arguments, unless the
- <parameter>arg_separator</parameter> parameter is specified, which is then
- used.
- </para>
- </note>
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>formdata</parameter></term>
+ <listitem>
+ <para>
+ May be an array or object containing properties.
+ </para>
+ <para>
+ The array form may be a simple one-dimensional structure, or an array
+ of arrays (who in turn may contain other arrays).
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>numeric_prefix</parameter></term>
+ <listitem>
+ <para>
+ If numeric indices are used in the base array and this parameter is
+ provided, it will be prepended to the numeric index for elements in
+ the base array only.
+ </para>
+ <para>
+ This is meant to allow for legal variable names when the data is
+ decoded by PHP or another CGI application later on.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>arg_separator</parameter></term>
+ <listitem>
+ <para>
+ <link linkend="ini.arg-separator.output">arg_separator.output</link>
+ is used to separate arguments, unless this parameter is specified,
+ and is then used.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Returns a URL-encoded string.
+ </para>
+ </refsect1>
+
+ <refsect1 role="changelog">
+ &reftitle.changelog;
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>5.1.2</entry>
+ <entry>
+ The <parameter>arg_separator</parameter> parameter was added.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1>
+ <refsect1 role="examples">
+ &reftitle.examples;
<example>
<title>Simple usage of <function>http_build_query</function></title>
<programlisting role="php">
@@ -59,20 +122,19 @@
<?php
$data = array('foo', 'bar', 'baz', 'boom', 'cow' => 'milk', 'php' =>'hypertext
processor');
-echo http_build_query($data);
-/* Outputs:
- 0=foo&1=bar&2=baz&3=boom&cow=milk&php=hypertext+processor
- */
-
+echo http_build_query($data) . "\n";
echo http_build_query($data, 'myvar_');
-/* Outputs:
-
myvar_0=foo&myvar_1=bar&myvar_2=baz&myvar_3=boom&cow=milk&php=hypertext+processor
- */
?>
]]>
</programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+0=foo&1=bar&2=baz&3=boom&cow=milk&php=hypertext+processor
+myvar_0=foo&myvar_1=bar&myvar_2=baz&myvar_3=boom&cow=milk&php=hypertext+processor
+]]>
+ </screen>
</example>
-
<example>
<title><function>http_build_query</function> with complex arrays</title>
<programlisting role="php">
@@ -138,21 +200,20 @@
]]>
</programlisting>
</example>
+ </refsect1>
- <note>
- <simpara>
- The <parameter>arg_separator</parameter> parameter was added in PHP 5.1.2.
- </simpara>
- </note>
-
- <simpara>
- See also:
- <function>parse_str</function>,
- <function>parse_url</function>,
- <function>urlencode</function>, and
- <function>array_walk</function>
- </simpara>
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>parse_str</function></member>
+ <member><function>parse_url</function></member>
+ <member><function>urlencode</function></member>
+ <member><function>array_walk</function></member>
+ </simplelist>
+ </para>
</refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/url/functions/parse-url.xml?r1=1.15&r2=1.16&diff_format=u
Index: phpdoc/en/reference/url/functions/parse-url.xml
diff -u phpdoc/en/reference/url/functions/parse-url.xml:1.15
phpdoc/en/reference/url/functions/parse-url.xml:1.16
--- phpdoc/en/reference/url/functions/parse-url.xml:1.15 Sat Feb 3
01:10:25 2007
+++ phpdoc/en/reference/url/functions/parse-url.xml Sat Feb 3 01:10:52 2007
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.15 $ -->
+<!-- $Revision: 1.16 $ -->
<refentry id="function.parse-url">
<refnamediv>
<refname>parse_url</refname>
<refpurpose>Parse a URL and return its components</refpurpose>
</refnamediv>
+
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
@@ -52,7 +53,6 @@
</listitem>
</varlistentry>
</variablelist>
-
</para>
</refsect1>
@@ -178,9 +178,10 @@
</note>
<note>
<para>
- <function>parse_url</function> is intended specifically for the purpose
of parsing URLs and not URIs.
- However, to comply with PHP's backwards compatibility requirements it
makes an exception for the
- file:// scheme where tripple slashes (file:///...) are allowed. For any
other scheme this is invalid.
+ This function is intended specifically for the purpose of parsing URLs
+ and not URIs. However, to comply with PHP's backwards compatibility
+ requirements it makes an exception for the file:// scheme where tripple
+ slashes (file:///...) are allowed. For any other scheme this is invalid.
</para>
</note>
</refsect1>
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/url/functions/rawurldecode.xml?r1=1.6&r2=1.7&diff_format=u
Index: phpdoc/en/reference/url/functions/rawurldecode.xml
diff -u phpdoc/en/reference/url/functions/rawurldecode.xml:1.6
phpdoc/en/reference/url/functions/rawurldecode.xml:1.7
--- phpdoc/en/reference/url/functions/rawurldecode.xml:1.6 Sat Feb 3
01:10:26 2007
+++ phpdoc/en/reference/url/functions/rawurldecode.xml Sat Feb 3 01:10:52 2007
@@ -1,22 +1,49 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<refentry id="function.rawurldecode">
<refnamediv>
<refname>rawurldecode</refname>
<refpurpose>Decode URL-encoded strings</refpurpose>
</refnamediv>
- <refsect1>
- <title>Description</title>
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>string</type><methodname>rawurldecode</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
</methodsynopsis>
<para>
Returns a string in which the sequences with percent
- (<literal>%</literal>) signs followed by two hex digits have been
- replaced with literal characters.
+ (<literal>%</literal>) signs followed by two hex digits have been replaced
+ with literal characters.
</para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>str</parameter></term>
+ <listitem>
+ <para>
+ The URL to be decoded.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Returns the decoded URL, as a string.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
<para>
<example>
<title><function>rawurldecode</function> example</title>
@@ -31,18 +58,29 @@
</programlisting>
</example>
</para>
+ </refsect1>
+
+ <refsect1 role="notes">
+ &reftitle.notes;
<note>
<para>
<function>rawurldecode</function> does not decode plus symbols ('+')
into spaces. <function>urldecode</function> does.
</para>
</note>
- <simpara>
- See also <function>rawurlencode</function>,
- <function>urldecode</function> and
- <function>urlencode</function>.
- </simpara>
</refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>rawurlencode</function></member>
+ <member><function>urldecode</function></member>
+ <member><function>urlencode</function></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/url/functions/rawurlencode.xml?r1=1.10&r2=1.11&diff_format=u
Index: phpdoc/en/reference/url/functions/rawurlencode.xml
diff -u phpdoc/en/reference/url/functions/rawurlencode.xml:1.10
phpdoc/en/reference/url/functions/rawurlencode.xml:1.11
--- phpdoc/en/reference/url/functions/rawurlencode.xml:1.10 Sat Feb 3
01:10:26 2007
+++ phpdoc/en/reference/url/functions/rawurlencode.xml Sat Feb 3 01:10:52 2007
@@ -1,30 +1,57 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
<refentry id="function.rawurlencode">
<refnamediv>
<refname>rawurlencode</refname>
<refpurpose>URL-encode according to RFC 1738</refpurpose>
</refnamediv>
- <refsect1>
- <title>Description</title>
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>string</type><methodname>rawurlencode</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
</methodsynopsis>
<para>
+ Encodes the given string according to <ulink
+ url="&url.rfc;1738">RFC 1738</ulink>.
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>str</parameter></term>
+ <listitem>
+ <para>
+ The URL to be encoded.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
Returns a string in which all non-alphanumeric characters except
<literal>-_.</literal> have been replaced with a percent
- (<literal>%</literal>) sign followed by two hex digits. This is
- the encoding described in RFC 1738 for protecting literal
- characters from being interpreted as special URL delimiters, and
- for protecting URLs from being mangled by transmission media
- with character conversions (like some email systems). For
- example, if you want to include a password in an FTP URL:
+ (<literal>%</literal>) sign followed by two hex digits. This is the
+ encoding described in <ulink url="&url.rfc;1738">RFC 1738</ulink> for
+ protecting literal characters from being interpreted as special URL
+ delimiters, and for protecting URLs from being mangled by transmission
+ media with character conversions (like some email systems).
</para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
<para>
<example>
- <title><function>rawurlencode</function> example 1</title>
+ <title>including a password in an FTP URL</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -33,6 +60,12 @@
?>
]]>
</programlisting>
+ &example.outputs;
+ <screen role="html">
+<![CDATA[
+<a href="ftp://user:[EMAIL PROTECTED]/x.txt">
+]]>
+ </screen>
</example>
</para>
<para>
@@ -49,15 +82,28 @@
?>
]]>
</programlisting>
+ &example.outputs;
+ <screen role="html">
+<![CDATA[
+<a
href="http://example.com/department_list_script/sales%20and%20marketing%2FMiami">
+]]>
+ </screen>
</example>
</para>
- <simpara>
- See also <function>rawurldecode</function>,
- <function>urldecode</function>,
- <function>urlencode</function> and
- <ulink url="&url.rfc;1738">RFC 1738</ulink>.
- </simpara>
</refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>rawurldecode</function></member>
+ <member><function>urldecode</function></member>
+ <member><function>urlencode</function></member>
+ <member><ulink url="&url.rfc;1738">RFC 1738</ulink></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/url/functions/urldecode.xml?r1=1.5&r2=1.6&diff_format=u
Index: phpdoc/en/reference/url/functions/urldecode.xml
diff -u phpdoc/en/reference/url/functions/urldecode.xml:1.5
phpdoc/en/reference/url/functions/urldecode.xml:1.6
--- phpdoc/en/reference/url/functions/urldecode.xml:1.5 Sat Feb 3 01:10:26 2007
+++ phpdoc/en/reference/url/functions/urldecode.xml Sat Feb 3 01:10:52 2007
@@ -1,20 +1,49 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<refentry id="function.urldecode">
<refnamediv>
<refname>urldecode</refname>
<refpurpose>Decodes URL-encoded string</refpurpose>
</refnamediv>
- <refsect1>
- <title>Description</title>
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>string</type><methodname>urldecode</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
</methodsynopsis>
<para>
Decodes any <literal>%<replaceable>##</replaceable></literal>
- encoding in the given string. The decoded string is returned.
+ encoding in the given string.
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>str</parameter></term>
+ <listitem>
+ <para>
+ The string to be decoded.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Returns the decoded string.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
<example>
<title><function>urldecode</function> example</title>
<programlisting role="php">
@@ -33,12 +62,19 @@
</programlisting>
</example>
</para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
<para>
- See also <function>urlencode</function>,
- <function>rawurlencode</function> and
- <function>rawurldecode</function>.
+ <simplelist>
+ <member><function>urlencode</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
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/url/functions/urlencode.xml?r1=1.10&r2=1.11&diff_format=u
Index: phpdoc/en/reference/url/functions/urlencode.xml
diff -u phpdoc/en/reference/url/functions/urlencode.xml:1.10
phpdoc/en/reference/url/functions/urlencode.xml:1.11
--- phpdoc/en/reference/url/functions/urlencode.xml:1.10 Sat Feb 3
01:10:26 2007
+++ phpdoc/en/reference/url/functions/urlencode.xml Sat Feb 3 01:10:52 2007
@@ -1,30 +1,57 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
<refentry id="function.urlencode">
<refnamediv>
<refname>urlencode</refname>
<refpurpose>URL-encodes string</refpurpose>
</refnamediv>
- <refsect1>
- <title>Description</title>
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>string</type><methodname>urlencode</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
</methodsynopsis>
<para>
+ This function is convenient when encoding a string to be used in a query
+ part of a URL, as a convenient way to pass variables to the next page.
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>str</parameter></term>
+ <listitem>
+ <para>
+ The string to be encoded.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
Returns a string in which all non-alphanumeric characters except
<literal>-_.</literal> have been replaced with a percent
- (<literal>%</literal>) sign followed by two hex digits and spaces
- encoded as plus (<literal>+</literal>) signs. It is encoded the
- same way that the posted data from a WWW form is encoded, that is
- the same way as in
- <literal>application/x-www-form-urlencoded</literal> media type.
- This differs from the RFC1738 encoding (see
- <function>rawurlencode</function>) in that for historical
- reasons, spaces are encoded as plus (+) signs. This function is
- convenient when encoding a string to be used in a query part of
- a URL, as a convenient way to pass variables to the next page:
+ (<literal>%</literal>) sign followed by two hex digits and spaces encoded
+ as plus (<literal>+</literal>) signs. It is encoded the same way that the
+ posted data from a WWW form is encoded, that is the same way as in
+ <literal>application/x-www-form-urlencoded</literal> media type. This
+ differs from the <ulink url="&url.rfc;1738">RFC 1738</ulink> encoding (see
+ <function>rawurlencode</function>) in that for historical reasons, spaces
+ are encoded as plus (+) signs.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
<example>
<title><function>urlencode</function> example</title>
<programlisting role="php">
@@ -37,22 +64,6 @@
</example>
</para>
<para>
- Note: Be careful about variables that may match HTML entities.
- Things like &amp, &copy and &pound are parsed by the
- browser and the actual entity is used instead of the desired
- variable name. This is an obvious hassle that the W3C has been
- telling people about for years. The reference is here:
- <ulink url="&url.argsep;">&url.argsep;</ulink>. PHP supports
- changing the argument separator to the W3C-suggested semi-colon
- through the arg_separator .ini directive. Unfortunately most user
- agents do not send form data in this semi-colon separated format.
- A more portable way around this is to use &amp; instead of
- & as the separator. You don't need to change PHP's
- arg_separator for this. Leave it as &, but simply encode
- your URLs using <function>htmlentities</function> or
- <function>htmlspecialchars</function>.
- </para>
- <para>
<example>
<title><function>urlencode</function> and
<function>htmlentities</function> example</title>
<programlisting role="php">
@@ -65,13 +76,43 @@
</programlisting>
</example>
</para>
+ </refsect1>
+
+ <refsect1 role="notes">
+ &reftitle.notes;
+ <note>
+ <para>
+ Be careful about variables that may match HTML entities. Things like
+ &amp, &copy and &pound are parsed by the browser and the
+ actual entity is used instead of the desired variable name. This is an
+ obvious hassle that the W3C has been telling people about for years.
+ The reference is here: <ulink url="&url.argsep;">&url.argsep;</ulink>.
+ </para>
+ <para>
+ PHP supports changing the argument separator to the W3C-suggested
+ semi-colon through the arg_separator .ini directive. Unfortunately most
+ user agents do not send form data in this semi-colon separated format.
+ A more portable way around this is to use &amp; instead of & as
+ the separator. You don't need to change PHP's arg_separator for this.
+ Leave it as &, but simply encode your URLs using
+ <function>htmlentities</function> or
+ <function>htmlspecialchars</function>.
+ </para>
+ </note>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
<para>
- See also <function>urldecode</function>,
- <function>htmlentities</function>,
- <function>rawurldecode</function> and
- <function>rawurlencode</function>.
+ <simplelist>
+ <member><function>urldecode</function></member>
+ <member><function>htmlentities</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