You are here: Using pop3.class.inc to read email server + retrieve new email + saving attachment « PHP Programming Language « IT news, forums, messages
Using pop3.class.inc to read email server + retrieve new email + saving attachment

Posted by patrice.fiset@gmail.com on 09/29/36 12:01

Hello, use pop3.class.inc found here (http://www.phpclasses.org/
browse/file/3925.html) to connect to my email server and to retrieve
new emails. The function also look at attachment and save the file on
a folder. Problem, the image files copied on the folder on my web
server, have size of 0k.

Here is the piece of code where I save the attachment (image) in the
folder:

// Give image a unique filename
$rand = md5(uniqid(rand(), 1));
$new_name = $rand.".jpg";

// Save image!
$image = fopen( $new_name, "wb" );
fwrite( $image, base64_decode( $file ) );
fclose( $image );

Anyone who used pop3.class.inc know what's wrong with this?

Thanks for your help.

Mc

 

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

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