?
Solved

Automate file compression and encryption using zip, php on Linux OS

Posted on 2007-04-03
4
Medium Priority
?
371 Views
Last Modified: 2013-12-01
I want to have a script preferably php on a linux OS:

generate a random password
Zip a fixed list of files and encrypt with the above password
move the file to a specified location
generate an email with the link to the location above and ebed the password created above
send the email
create a cron job or other scheduled entry to remove the file a fixed time in the future

I can complete parts of this from my shell scripting days but I'm not sure of the most efficient way to do this in php
Your insights are greatly appreciated
0
Comment
Question by:jerrylmclaughlin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 19

Accepted Solution

by:
Michael701 earned 600 total points
ID: 18847599
What version of PHP?

Take a look at the zip library.

http://www.php.net/zip

Michael
0
 

Author Comment

by:jerrylmclaughlin
ID: 18847752
PHP 4.4.6
0
 
LVL 48

Assisted Solution

by:hernst42
hernst42 earned 200 total points
ID: 18848913
AFAIK there is no php-extension lib which is capable of creating zips with passwords, so generating the zip must be done via shell. You can use php to build the password, filelists, ... and use exec to create the zip with the external program. So in php it is often easier/more readable to add the error-handling and checking than in shell-scripts. If you have a intereaction with the user php is better to use as it has a easy way to access the parameters from the script.
0
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 200 total points
ID: 18862628
actually these are 2 script s you need: one for encryption and one for cron

> . but I'm not sure of the most efficient way to do this in php ..
I guess you better do it with a shell, or switch to a better CGI language (perl, python, java, not sure for ruby) which support libs for compression and encryption. The cron still will be a simple shell.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Businesses who process credit card payments have to adhere to PCI Compliance standards. Here’s why that’s important.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question