Posted by Colin McKinnon on 07/06/06 19:31
Krustov wrote:
> Using the standard php functions found on most web servers - how do i
> zip selected folders and have the zip file emailed to myself .
>
> Not as a cron job or anything automated - it will be a option i will add
> in the control panel .
IMHO its a lot easier to do from the shell than in PHP. Write a shell script
and call it from PHP.
Something like:
#!/bin/bash
RECIP="$1"
if [ -z "$RECIP" ]; then
echo usage sendzip recipient@test.com file1 file2 file3 ....
fi
zip data.{$$}.zip $@
mail -a data{$$}.zip -s "Here are you warez" $RECIP <<<EOH
Here is the files you asked for.
EOH
C.
Navigation:
[Reply to this message]
|