Three ways to unzip the zip files on Your web site.

As a webmaster you have to upload files to your web site. These files can be simple .html or .php files or script files. Script files can be .pl, .cgi or .php …

Sometimes you need to upload zip files to your web site when you are uploading script files, backup files or moving data from one host to other etc.

Once you upload zip file there are three ways you can unzip it.

1. Using your web host panel ‘Extract’ function.
2. Using telnet.
3. Using a small php script utility.

1. Using your web host panel ‘Extract’ function.

unzip files using cpanel

1. Login your cpanel or any host panel.
2. Go to ‘File manager’.
3. Open up the folder where you have uploaded the zip file via your ftp software.
4. Select the file with left mouse button.
5. There is a link called ‘Extract’ on top of the page or on right menubar. Click on it.
6. You will be prompted where to unzip the files. Select the location or leave it default. If you leave it to default, files are extracted into the same folder.
7. Click ok. You will see the list of files extracted.

2. Using telnet.

unzip files using telnet

1. Open your putty.exe application and SSH into your web site.
2. Go to your script directory where the zip file is.
3. Run the following command based on the file type:

If a file ends in .zip (for example, file.zip) type:
unzip file.zip

If a file ends in .tar (e.g., file.tar) type:
tar -xvf file.tar

If a file ends in .gz (for example, file.gz) type:
gzip -d file.gz

If a file ends in .tar.gz (e.g. file.tar.gz) type:
gzip -d file.tar.gz
and then
tar -xvf file.tar

3. Using a small php script utility.

unzip files using php script

Here is a php script that unzips the zip files in a directory.

1. Copy the code and and paste it in a text file and save it as unzip.txt on your computer.
2. Upload the text file into the directory where the zip file is. Rename it to unzip.php.
3. Access the script like – http://www.yoursite.com/script/unzip.php
4. You will see the list of zip files. Select the file and click on ‘Unzip’ button.

.

Related Posts:

  • No Related Posts