希望[hope]

3月 11th, 2010

希望

Flowers

3月 2nd, 2010

We went to Kyoto Botanical Garden(京都府立植物園).
Our first purpose was to see Japanese apricots though,
there was a greenhouse where has many plants from all over the world.
We got so excited and took many pictures, thus these are many flowers with various sorts. :D





























なぜかimap_headerinfo()の戻り値にはContent-Typeが含まれないので、
直に取得する力技で解決。

When you try to get charset of a mail on IMAP, imap_headerinfo() doesn’t include ‘Content-Type’ in the return value.
Below is a function to get type of charset from a mail header directly by calling imap_fetchheader.


<?

/**

@context IMAPハンドル

@number  メールのID

@defcharset 失敗した時に返すデフォルトの文字セット名

@return 文字セット名

*/

function imap_getcharset($context, $number, $defcharset = "iso-2022-jp")

{

    

    
// Get charset

    
$h = imap_fetchheader($context, $number);

    
$mc = preg_match("/charsets*=s*(.+?)[;\n]/s", $h, $m);

    
$charset = $m[1] ? strtolower(trim($m[1])) : $defcharset;

    

}

?>

return
odoruinu.net, softwares, drawings & photography by noradaiko.
all copyright(C) 2008 noradaiko.