You are here: Re: Zip some folders and send by email « PHP Programming Language « IT news, forums, messages
Re: Zip some folders and send by email

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация