FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


PHP Unzip





ralcantara
Another script. Can be usefull in external hosts where you don't have ssh access.

1) Create the script zip.php like this:
<?php

$file=$_REQUEST['file'];

$zip = new ZipArchive;
$res = $zip->open("{$file}");
if ($res === TRUE) {
$zip->extractTo('./');
$zip->close();
echo "ok - $file";
} else {
echo "failed";
}


2) To use, you call like this:
http://<IP>:<PORT>/<URI>/zip.php?file=<your_zip_file_in_server>.zip

Wink
jmraker
You can simplify open("{$file}") into open($file)
AftershockVibe
For those with DirectAdmin hosting set-ups, their file browser also has this feature.
Works for .tar.gz too.
Related topics
http://tuvanonline.com/library/index.php
PHP-Nuke platium?
PHP Write to line
Anyone good with PHP-NUKE?
PHP safety?
req: PHP to list files in directory, and link to them
php admin and mysql admin console
Mysql And PHP HELP PLZ
Great php editor
Script php about gallery
File upload with PHP, Build an upload database for your site
[php scripts ] phpweather&email
PHP Forum???
Zip and Unzip in DirectAdmin's File Manager
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.