Create zip_helper.php

Functionality that is not in PHP or CI: create zip-file in memory. Took it directly from this project: https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/zip.lib.php 

Used it in our software successfully.

Found it here: http://stackoverflow.com/questions/1189019/manipulate-an-archive-in-memory-with-php-without-creating-a-temporary-file-on-d

Use:

    //create the zip
    $zip = new zipfile();
    
    //add files to the zip, passing file contents, not actual files
    $zip->addFile($file_content, $file_name);
    
    ...
    
    //prepare the proper content type
    header("Content-type: application/octet-stream");
    header("Content-Disposition: attachment; filename=my_archive.zip");
    header("Content-Description: Files of an applicant");

    //get the zip content and send it back to the browser
    exit( $zip->file() );