Re: howto get .tar.gz content's filenames

From: Date: Thu, 06 Dec 2007 17:26:40 +0000
Subject: Re: howto get .tar.gz content's filenames
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-265520@lists.php.net to get a copy of this message
On Mon, December 3, 2007 9:05 pm, Shelley Shyan wrote: > It may not be a php question, but I want to get the filename lists > that a .tar.gz file contains and give it to an array. > How can I manage that? I thought there was a 'tar' PHP extension, but don't see it now... There is a 'gzip' you can use to unzip it... If all else fails, punt to the OS: <?php exec('/full/path/to/your/binary/tar -tzvf /full/path/to/file.tar.gz', $output, $error); var_dump($output); if ($error){ echo "OS Error: $error\n"; } ?> -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So?

« previous php.general (#265520) next »