imap_threadとは? わかりやすく解説

Weblio 辞書 > コンピュータ > PHP関数リファレンス > imap_threadの意味・解説 

imap_thread

(PHP 4 >= 4.0.7, PHP 5)
imap_thread — スレッド化したメッセージのツリーを返す

説明

array imap_thread ( resource imap_stream [, int options] )
スレッド化されたメッセージのツリーを取得します。

パラメータ

imap_stream
imap_open() が返す IMAP ストリーム。
options


返り値

imap_thread() は、REFERENCES でスレッド化したメッセージのツリーを含む連想配列を返します。 エラー時には FALSE を返します。
現在のメールボックス内のすべてのメッセージが、結果の配列の 3 つの エントリで表されます。
  • $thread["XX.num"] - 現在のメッセージ番号。
  • $thread["XX.next"]
  • $thread["XX.branch"]

例 971. imap_thread() の例
<?php

// ここでは、ニュースグループのスレッドを HTML で出力します。

$nntp = imap_open('{news.example.com:119/nntp}some.newsgroup', '', '');
$threads = imap_thread($nntp);

foreach ($threads as $key => $val) {
  $tree = explode('.', $key);
  if ($tree[1] == 'num') {
   $header = imap_headerinfo($nntp, $val);
   echo "<ul>\n\t<li>" . $header->fromaddress . "\n";
  } elseif ($tree[1] == 'branch') {
   echo "\t</li>\n</ul>\n";
  }
}

imap_close($nntp);

?>





英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「imap_thread」の関連用語

imap_threadのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



imap_threadのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
PHP Documentation GroupPHP Documentation Group
Copyright © 1997 - 2025 by the PHP Documentation Group.

©2025 GRAS Group, Inc.RSS