(PECL mailparse >= 0.9.0)
mailparse_stream_encode — ソースファイルポインタからストリームデータを取得し、 エンコーディングを適用し、出力ファイルポインタに書き込む
ソースファイルポインタからストリームデータを取得し、
encoding
を適用して
それを出力ファイルポインタに書き込みます。
sourcefp
有効なファイルハンドル。このファイルからのストリームがパーサに流し込まれます。
destfp
エンコードしたデータを書き込むファイルハンドル。
encoding
mbstring モジュールがサポートする文字エンコーディングのいずれか。
例1 mailparse_stream_encode() の例
<?php
/ email.eml の中身は: hello, this is some text=hello.
$fp = fopen('email.eml', 'r');
$dest = tmpfile();
mailparse_stream_encode($fp, $dest, "quoted-printable");
rewind($dest);
/ ファイルの内容を表示します
fpassthru($dest);
?>
上の例の出力は以下となります。
hello, this is some text=3Dhello.
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant