previousNet_NNTP_Client::getDate() (Previous) (Next) Net_NNTP_Client::getHeader()next

View this page in Last updated: Sun, 21 Jun 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Net_NNTP_Client::getGroups()

Net_NNTP_Client::getGroups() – ニュースグループの一覧を取得する

Synopsis

require_once 'Net/NNTP/Client.php';

array Net_NNTP_Client::getGroups ( )

Description

有効なニュースグループの一覧を返します。

Return value

array - 二次元配列です。最初の要素が ニュースグループ名を表し、それぞれの要素の下にニュースグループの情報が 格納されています。

  • $groups[newsgroup_name]['group'] ニュースグループの名前

  • $groups[newsgroup_name]['last'] 最新の記事の記事番号

  • $groups[newsgroup_name]['first'] 最初の記事の記事番号

  • $groups[newsgroup_name]['posting'] とりうる値: y - はい、 n - いいえ、 m - モデレートされています

Note

This function can not be called statically.

一般向けに公開されているニュースサーバの場合、30,000 以上のニュースグループが含まれていることもあります。そのような場合、 この関数の実行時間が php.ini で設定されている maximum execution time を超えてしまうかもしれません。

Example

getGroups() の使用

<?php
...
$ret $nntp->connect('news.php.net');
if( 
PEAR::isError($ret)) {
    
// エラー処理
} else {
    
// 成功
    
$groups $nntp->getGroups();
    
// 有効なニュースグループ一覧の表示
    
foreach($groups as $group) {
        echo 
$group['group'].'<br>';
    }
}
?>
previousNet_NNTP_Client::getDate() (Previous) (Next) Net_NNTP_Client::getHeader()next

Download Documentation Last updated: Sun, 21 Jun 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.