Script to Download jar files as zip ....!!!plz help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Script to Download jar files as zip ....!!!plz help

    Pls dude, i am a newbie in coding....i am working on an auto index download script. I want the script for users to be able to download jar files as zip !....plz if u have that script, kindly drop it.....thx

    #2
    auto index script already available so search in forum. for jar file download, define MIME TYPE

    Comment


      #3
      Code:
      <?php
      
      $zip = new ZipArchive();
      
      if ($zip->open('filename.zip', ZIPARCHIVE::CREATE) !== TRUE) {
           die ("could not open archive");
      }
      
      $fileList = Array(
           'yourfile.jar'
      );
      
      foreach ($fileList as $f) {
           $zip->addFile($f) or die ("ERROR: could not add file: $f");
      }
      
      $zip->close();
      echo "Archive created succesfully.";
      
      ?>

      Comment


        #4
        HOW DO I DEFINE MY MIME TYPE@videodesihot

        Added after 2 minutes:

        Thanks dude.....

        Thanks @ANGEL
        Last edited by Donostex; 27.10.10, 12:07.

        Comment


          #5
          I dont think ANGELUS posted code will work ever ..


          try to look here
          Create ZIP File (zip, archive, ZipArchive, create zip file) - PHP Classes
          Unamos los corazones,hoy todos somos multicolores!

          Comment


            #6
            Originally posted by Donostex View Post
            HOW DO I DEFINE MY MIME TYPE@videodesihot

            Added after 2 minutes:

            Thanks dude.....

            Thanks @ANGEL
            Coding Talk: sis and other mobile content MIME types

            Comment


              #7
              ...Angelus dat wont work... Jor oh!
              ...i will post somethin dat will wrk 4 u ere

              Comment


                #8
                interesting.........................but not worked lol


                I'm Proud to be a Sri Lankan!

                Comment

                Working...
                X