RE: [PHP] Help on e-mail attachments retrieval adn ZIP uncompression.

2001-09-03 Thread Richard Heyes

> 1) How to retrieve messages from a POP3 mailbox and save only 
> the ZIP files attachments?

A couple of ways.

1. Use the imap (it does pop3 too) extension to connect to the mail
server, parse the mails and extract the zip files.

2. Use mime decoding php scripts. There's one I've just committed to
PEAR, which you can get by going to cvs.php.net --> php4 --> pear -->
mail --> mimeDecode.php. It's beta quality at the moment, but should get
better. Also, this is just a class/object, so it will require
incorporating into your own scripts.

> 2) How to decompress the ZIP files?

If you're on unix, exec('unzip ...'). Or if windows, you can use the cmd
line version of winzip.

-- 
Richard Heyes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Help on e-mail attachments retrieval adn ZIP uncompression.

2001-09-03 Thread Carlos Fernando Scheidecker Antunes

Hello Everybody,

I have a software writen in Delphi which I am migrating to Kylix but I would like to 
do it in PHP instead.

What the software does is to access an e-mail address and retrieve the messages saving 
the files ending with .zip to a local directory. After that, it decompresses the ZIP 
files and read their txt contents and import the contents to a MySQL database. Each 
ZIP file has a TXT file.

So what I need to know and the help I am asking you for is :

1) How to retrieve messages from a POP3 mailbox and save only the ZIP files 
attachments?

2) How to decompress the ZIP files?

Thank you,

Carlos Fernando.

Linux User #207984