Zip Extractor

This is where you share YOUR scripts with others

Moderators: macek, egami, gesf

NewLineEquity
New php-forum User
New php-forum User
Posts: 1
Joined: Sat Nov 20, 2010 1:51 am
Contact:

Zip Extractor

Postby NewLineEquity » Sat Nov 20, 2010 6:16 am

Sometimes you would be wasted your time to upload Joomla, wordpress, Oscommerce and some large MB files into webserver. If you have site's fantastico software you would be installed these web applications through this fantastico in one second. If you have no fantastico, how do you Upload large files?. Dont waste your time. I have wrote the simple PHP extrator script below. Follow this method.
First make your folder to zip. Then upload this zip into the webserver root directory. Next upload the following script into the same root directory to extract your zip file.

PHP script - zipextractor.php


Code: Select all

< ?php
$zip = new ZipArchive;
if ($zip->open('yourzipfilename.zip') === TRUE) {
$zip->extractTo('/home/username/public_html/foldername/'); /*if you dont want to extract this zip into subfolder, your path should be '/home/username/public_html/'*/
$zip->close();
echo 'ok';
} else {
echo 'failed';
}
?>



Run the zipextractor.php in browser(EX: http://www.yourdomainame.com/zipextractor.php). Now your zip file will extract into your webserver's folder where you want.

Thanks to http://webresource4u.blogspot.com/2009/ ... erver.html

-----------------------
New Line Equity

Return to “Your Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest

cron