看板 PHP 關於我們 聯絡資訊
※ 引述《drlai (蘇打)》之銘言: : 目前成功的使用imap function來連結pop3的mail server : 但是我該怎麼把信件中的附件存成檔案呢? : 信件內容.. : ------=_Part_42159_7265662.1158292799902 Content-Type: image/jpeg : Content-Transfer-Encoding: base64 Content-ID: Content-Location: : 2003320204914.jpg Content-Disposition: : (中略..一堆編碼過的文件) : 從信件內容可以得知是下面的編碼是經過base64來處理 : 那請問我該如將body的內容轉成檔案呢 : 麻煩指導..感謝m(_ _)m RFC2048 RFC2045 RFC2046 echo base64_decode("content") 我是用 preg_match_all('\-{2}[^\r\n]+\', $body, $match) 去濾出片段. 在把內容節出來 $content = explode("\r\n\r\n", $match_part) ; -- Live Long and Prosper -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 202.132.72.186