phpsycho Posted August 2, 2011 Share Posted August 2, 2011 I have some code that it supposed to pull the image code in a attachment and the decode it so it can be viewed. <?php include ('includes/conn.php'); $id = $_GET['id']; $num = $_GET['num']; $mime = strtolower($_GET['mime']); $transfer = $_GET['transfer']; header("Content-type: image/$mime"); $servr = "imap.**.com:143/novalidate-cert/tls"; $user = "adam@**"; $passwd = "**"; $pop = imap_open('{'.$servr.'}', $user, stripslashes($passwd)); $img = imap_fetchbody($pop, $id, $num); imap_close($pop); if ($transfer == 'BASE64'){ $img = base64_decode($img); }else if ($transfer == 'QUOTED-PRINTABLE'){ $img = imap_qprint($img); } echo $img; ?> All I see is a blank page when I run this. I commented out the header() so I can see the code just to check if its showing something or not. It does. That code should display the image shouldn't it? I checked the email message on thunderbird and the image is viewable there. it says its base64 too. Is there something I am missing in this code? I posted once before about this problem, hope its not a problem to repost this; hadn't got any help on it yet. I'm just in a time crunch so trying to get it finished quick. Thanks guys. Link to comment https://forums.phpfreaks.com/topic/243635-image-base64-decode/ Share on other sites More sharing options...
phpsycho Posted August 4, 2011 Author Share Posted August 4, 2011 bump Link to comment https://forums.phpfreaks.com/topic/243635-image-base64-decode/#findComment-1251849 Share on other sites More sharing options...
phpsycho Posted August 4, 2011 Author Share Posted August 4, 2011 Okay.. how bout this lol anybody know of a different place on the web that someone would know the problems going on with this? Thanks Link to comment https://forums.phpfreaks.com/topic/243635-image-base64-decode/#findComment-1251993 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.