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


zip a file and send to user





Mgccl
I already got a file in my hand... so now I want to zip it and send to user directly...
HOW do I do that? anyone know a zip function that put in file and output files....?
and after zipped, I want directly send to user, not let user download it because I put it inside the memory not on hard disk...
Any one got suggestsion?
ncwdavid
Mgccl wrote:
I already got a file in my hand... so now I want to zip it and send to user directly...
HOW do I do that? anyone know a zip function that put in file and output files....?
and after zipped, I want directly send to user, not let user download it because I put it inside the memory not on hard disk...
Any one got suggestsion?


Just right click on the file and then "send to" then click "Compressed folder" and I don't realy know what your talking about in the other bit.
Mgccl
this is for... PHP programming...
using php to do that... =.=
but thanks for your help........
kenny121
use the Email as a accessories
badai
i know phpmyadmin can do this.

so after some search in phpmyadmin folder, i found this file in phpmyadmin folder.

/libraries/zip.lib.php

i'm not really good at php, so u need to study that file on your own.
deepak
make_archive("the/directory", $zip_archive_object);
Code:

<?php
function make_archive( $dir , &$zip, $extdir="")
{
       if (is_dir($dir)) {
           if ($dh = opendir($dir)) {
               while (($file = readdir($dh)) !== false ) {
                       if( $file != "." && $file != ".." )
                       {
                               if( is_dir( $dir . $file ) )
                               {

                                           $zip->add_file($dir.$file,$extdir.$file);

                                           make_archive($dir.$file."/" , $zip, $extdir.$file."/");

                               }
                               else
                               {
             
                                           $zip->add_file($dir.$file,$extdir.$file);                                                       
                               }
                       }
               }
               closedir($dh);
           }
       }
return true;
}
Mgccl
THX, no more problems~
Related topics
uncompress zip file in DA [Resolved]
Can I copy/upload entire directories in a frihost account
File upload with PHP, Build an upload database for your site
751 Useful Windows XP Files
PHPNuke installation problem
th 2038 bug and google
Download database.
Protect Downloads??
how to unlock a zip or rar file
Upload a file from host to other file host
How to password protect a zip file
HCalculator - My Little Project
[UPDATE] zip support
Best FTP Client on EARTH
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.