Getting data as zipped format using PHP

Discussion in 'Web Design and Development' started by acidity, Oct 1, 2007.

  1. acidity macrumors regular

    Joined:
    Sep 7, 2006
    #1
    Hello

    Here is my table structure

    document_name,
    document_meta_data for searching,
    document_content

    So I need to allow a user to fetch documents based on various meta data information. Corresponding documents are BLOB data each with 1-2MB of text.

    Once a user does a search I show him a list of names. I dont query the document_content as its not required.

    Now, I have to provide an option where I allow the user to download all the DOCUMENT_CONTENT returned by the query as a zip file.

    Basically, I want to query the database get the result, make a temporary ZIP or TAR GZ file at the server which is allowed for downloading and once the user downloads the file its deleted from the server.

    How should I approach this problem? Pointers to info would be appreciated.
     
  2. macfaninpdx macrumors regular

    Joined:
    Mar 6, 2007
    #2
    Does this link help?
     
  3. acidity thread starter macrumors regular

    Joined:
    Sep 7, 2006
    #3
    Yes, definitely. Thanks a lot.

    One more question, what would be the best method to delete those temporary zip files that I created to download?

    Run a cron job after every five minutes to delete the zip files?
     

Share This Page