1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- Purpose: compression -->
<!-- Membership: pecl, external -->
<reference id="ref.rar">
<title>Rar Functions</title>
<titleabbrev>Rar</titleabbrev>
<partintro>
<section id="rar.intro">
&reftitle.intro;
<para>
Rar is a powerful and effective archiver created by Eugene Roshal.
This extension gives you possibility to read Rar archives but
doesn't support writing Rar archives, because this is not supported
by UnRar library and is directly prohibited by it's license.
</para>
<para>
More information about Rar and UnRar can be found at <ulink
url="&url.rar;">&url.rar;</ulink>.
</para>
</section>
<section id="rar.requirements">
&reftitle.required;
&no.requirement;
</section>
&reference.rar.ini;
<section id="rar.install">
&reftitle.install;
<para>
Rar is currently available through PECL
<ulink url="&url.pecl.package;rar">&url.pecl.package;rar</ulink>.
</para>
<para>
Also you can use the PECL installer to install the Rar extension,
using the following command: <command>pecl -v install rar</command>.
</para>
<para>
You can always download the tar.gz package and install Rar by hand:
<example>
<title>Rar installation</title>
<programlisting role="shell">
<![CDATA[
gunzip rar-xxx.tgz
tar -xvf rar-xxx.tar
cd rar-xxx
phpize
./configure && make && make install
]]>
</programlisting>
</example>
</para>
<para>
Windows users can download the extension dll <filename>php_rar.dll</filename>
here: <ulink url="&url.pecl.get.win;">&url.pecl.get.win;</ulink>.
</para>
</section>
<section id="rar.resources">
&reftitle.resources;
<para>
There is one resource used in Rar extension: a file descriptor returned
by <function>rar_open</function>.
</para>
</section>
<section id="rar.constants">
&reftitle.constants;
<variablelist>
<varlistentry>
<term>
<constant>RAR_HOST_MSDOS</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>RAR_HOST_OS2</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>RAR_HOST_WIN32</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>RAR_HOST_UNIX</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>RAR_HOST_BEOS</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
</variablelist>
</section>
<section id="rar.examples">
&reftitle.examples;
<para>
<example>
<title>Rar extension overview example</title>
<programlisting role="php">
<![CDATA[
<?php
$rar_file = rar_open('example.rar') or die("Can't open Rar archive");
$entries = rar_list($rar_file);
foreach ($entries as $entry) {
echo 'Filename: ' . $entry->getName() . "\n";
echo 'Packed size: ' . $entry->getPackedSize() . "\n";
echo 'Unpacked size: ' . $entry->getUnpackedSize() . "\n";
$entry->extract('/dir/extract/to/');
}
rar_close($rar_file);
?>
]]>
</programlisting>
</example>
</para>
<para>
This example opens a Rar file archive and extracts each entry to the
specified directory.
</para>
</section>
</partintro>
&reference.rar.functions;
</reference>
<!-- 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:"../../../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
-->
|