Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (22 sloc) 0.547 kb
RarEntry::getStream handles files with non-unique entry names
<?php if(!extension_loaded("rar")) print "skip"; ?>
$file = RarArchive::open(dirname(__FILE__) . '/repeated_name.rar');
foreach ($file as $e) {
$stream = $e->getStream();
if ($stream) {
echo $e->getPosition() . ". $e\n";
echo stream_get_contents($stream);
echo "\n";
echo "Done.\n";
0. RarEntry for file "file.txt" (ae2a88a7)
Content of first file.
1. RarEntry for file "file.txt" (771df243)
Content of second file.
Jump to Line
Something went wrong with that request. Please try again.