Hello,
how to unrar files using php on windows? Is there any script or codes to make it possible?
Thanks
Hello,
how to unrar files using php on windows? Is there any script or codes to make it possible?
Thanks
Check this link out:
http://us2.php.net/manual/en/book.rar.php
Using that extension, you can do something like this:
$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);