|
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
[Back to original message]
|